@openfort/openfort-node 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -0
- package/dist/api/apis.d.ts +26 -0
- package/dist/api/apis.js +54 -0
- package/dist/api/apis.js.map +1 -0
- package/dist/api/contractsApi.d.ts +82 -0
- package/dist/api/contractsApi.js +317 -0
- package/dist/api/contractsApi.js.map +1 -0
- package/dist/api/defaultApi.d.ts +142 -0
- package/dist/api/defaultApi.js +653 -0
- package/dist/api/defaultApi.js.map +1 -0
- package/dist/api/logsApi.d.ts +52 -0
- package/dist/api/logsApi.js +155 -0
- package/dist/api/logsApi.js.map +1 -0
- package/dist/api/playersApi.d.ts +157 -0
- package/dist/api/playersApi.js +722 -0
- package/dist/api/playersApi.js.map +1 -0
- package/dist/api/policiesApi.d.ts +175 -0
- package/dist/api/policiesApi.js +812 -0
- package/dist/api/policiesApi.js.map +1 -0
- package/dist/api/projectsApi.d.ts +104 -0
- package/dist/api/projectsApi.js +450 -0
- package/dist/api/projectsApi.js.map +1 -0
- package/dist/api/sessionsApi.d.ts +70 -0
- package/dist/api/sessionsApi.js +276 -0
- package/dist/api/sessionsApi.js.map +1 -0
- package/dist/api/transactionIntentsApi.d.ts +124 -0
- package/dist/api/transactionIntentsApi.js +565 -0
- package/dist/api/transactionIntentsApi.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +66 -0
- package/dist/index.js.map +1 -0
- package/dist/model/accountResponse.d.ts +33 -0
- package/dist/model/accountResponse.js +64 -0
- package/dist/model/accountResponse.js.map +1 -0
- package/dist/model/accountsResponse.d.ts +28 -0
- package/dist/model/accountsResponse.js +39 -0
- package/dist/model/accountsResponse.js.map +1 -0
- package/dist/model/allowFunctionResponse.d.ts +31 -0
- package/dist/model/allowFunctionResponse.js +54 -0
- package/dist/model/allowFunctionResponse.js.map +1 -0
- package/dist/model/allowFunctionsResponse.d.ts +28 -0
- package/dist/model/allowFunctionsResponse.js +39 -0
- package/dist/model/allowFunctionsResponse.js.map +1 -0
- package/dist/model/apiKeyResponse.d.ts +28 -0
- package/dist/model/apiKeyResponse.js +44 -0
- package/dist/model/apiKeyResponse.js.map +1 -0
- package/dist/model/assetInventory.d.ts +34 -0
- package/dist/model/assetInventory.js +44 -0
- package/dist/model/assetInventory.js.map +1 -0
- package/dist/model/assetType.d.ts +17 -0
- package/dist/model/assetType.js +22 -0
- package/dist/model/assetType.js.map +1 -0
- package/dist/model/authResponse.d.ts +26 -0
- package/dist/model/authResponse.js +34 -0
- package/dist/model/authResponse.js.map +1 -0
- package/dist/model/contractResponse.d.ts +33 -0
- package/dist/model/contractResponse.js +64 -0
- package/dist/model/contractResponse.js.map +1 -0
- package/dist/model/contractResponseAbi.d.ts +24 -0
- package/dist/model/contractResponseAbi.js +23 -0
- package/dist/model/contractResponseAbi.js.map +1 -0
- package/dist/model/contractResponseAbiAnyOfInner.d.ts +34 -0
- package/dist/model/contractResponseAbiAnyOfInner.js +74 -0
- package/dist/model/contractResponseAbiAnyOfInner.js.map +1 -0
- package/dist/model/contractsResponse.d.ts +28 -0
- package/dist/model/contractsResponse.js +39 -0
- package/dist/model/contractsResponse.js.map +1 -0
- package/dist/model/createSessionPlayerRequest.d.ts +31 -0
- package/dist/model/createSessionPlayerRequest.js +59 -0
- package/dist/model/createSessionPlayerRequest.js.map +1 -0
- package/dist/model/fragment.d.ts +29 -0
- package/dist/model/fragment.js +44 -0
- package/dist/model/fragment.js.map +1 -0
- package/dist/model/gas.d.ts +29 -0
- package/dist/model/gas.js +39 -0
- package/dist/model/gas.js.map +1 -0
- package/dist/model/getProjectResponse.d.ts +27 -0
- package/dist/model/getProjectResponse.js +39 -0
- package/dist/model/getProjectResponse.js.map +1 -0
- package/dist/model/interaction.d.ts +27 -0
- package/dist/model/interaction.js +39 -0
- package/dist/model/interaction.js.map +1 -0
- package/dist/model/inventoryResponse.d.ts +29 -0
- package/dist/model/inventoryResponse.js +44 -0
- package/dist/model/inventoryResponse.js.map +1 -0
- package/dist/model/jsonFragment.d.ts +33 -0
- package/dist/model/jsonFragment.js +69 -0
- package/dist/model/jsonFragment.js.map +1 -0
- package/dist/model/log.d.ts +31 -0
- package/dist/model/log.js +59 -0
- package/dist/model/log.js.map +1 -0
- package/dist/model/models.d.ts +83 -0
- package/dist/model/models.js +324 -0
- package/dist/model/models.js.map +1 -0
- package/dist/model/paramType.d.ts +32 -0
- package/dist/model/paramType.js +64 -0
- package/dist/model/paramType.js.map +1 -0
- package/dist/model/playerResponse.d.ts +36 -0
- package/dist/model/playerResponse.js +74 -0
- package/dist/model/playerResponse.js.map +1 -0
- package/dist/model/playersResponse.d.ts +28 -0
- package/dist/model/playersResponse.js +39 -0
- package/dist/model/playersResponse.js.map +1 -0
- package/dist/model/policiesResponse.d.ts +28 -0
- package/dist/model/policiesResponse.js +39 -0
- package/dist/model/policiesResponse.js.map +1 -0
- package/dist/model/policyResponse.d.ts +34 -0
- package/dist/model/policyResponse.js +64 -0
- package/dist/model/policyResponse.js.map +1 -0
- package/dist/model/projectLogs.d.ts +28 -0
- package/dist/model/projectLogs.js +39 -0
- package/dist/model/projectLogs.js.map +1 -0
- package/dist/model/projectResponse.d.ts +32 -0
- package/dist/model/projectResponse.js +59 -0
- package/dist/model/projectResponse.js.map +1 -0
- package/dist/model/projectsResponse.d.ts +28 -0
- package/dist/model/projectsResponse.js +39 -0
- package/dist/model/projectsResponse.js.map +1 -0
- package/dist/model/responseResponse.d.ts +32 -0
- package/dist/model/responseResponse.js +64 -0
- package/dist/model/responseResponse.js.map +1 -0
- package/dist/model/sessionResponse.d.ts +32 -0
- package/dist/model/sessionResponse.js +64 -0
- package/dist/model/sessionResponse.js.map +1 -0
- package/dist/model/strategy.d.ts +27 -0
- package/dist/model/strategy.js +39 -0
- package/dist/model/strategy.js.map +1 -0
- package/dist/model/sumGas.d.ts +27 -0
- package/dist/model/sumGas.js +39 -0
- package/dist/model/sumGas.js.map +1 -0
- package/dist/model/transactionIntentResponse.d.ts +40 -0
- package/dist/model/transactionIntentResponse.js +89 -0
- package/dist/model/transactionIntentResponse.js.map +1 -0
- package/dist/model/transactionIntentsResponse.d.ts +28 -0
- package/dist/model/transactionIntentsResponse.js +39 -0
- package/dist/model/transactionIntentsResponse.js.map +1 -0
- package/dist/model/userOpResult.d.ts +26 -0
- package/dist/model/userOpResult.js +34 -0
- package/dist/model/userOpResult.js.map +1 -0
- package/package.json +40 -0
- package/tsconfig.json +38 -0
- package/tsconfig.tsbuildinfo +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
## @openfort/openfort-node@1.0.0
|
|
2
|
+
|
|
3
|
+
### Installation
|
|
4
|
+
|
|
5
|
+
Add the Openfort registry to the configuration file for NPM `.npmrc`:
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
@openfort:registry=https://npm.pkg.github.com
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Depends on the package manager that used in the project, one of the following commands should be run:
|
|
12
|
+
|
|
13
|
+
```shell
|
|
14
|
+
npm install @openfort/openfort-node
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```shell
|
|
18
|
+
yarn add @openfort/openfort-node
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Usage
|
|
22
|
+
|
|
23
|
+
Below code snippet shows exemplary usage of the configuration and the API.
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import Openfort from "@openfort/openfort-node";
|
|
27
|
+
|
|
28
|
+
async function example() {
|
|
29
|
+
const openfort = new Openfort("sk_test_XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX");
|
|
30
|
+
const players = await openfort.players.getPlayers();
|
|
31
|
+
for (const player of players.body.data) {
|
|
32
|
+
console.log(player.id);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const newPlayer = await openfort.players.createPlayer("Test");
|
|
36
|
+
console.log(newPlayer.body.id)
|
|
37
|
+
await openfort.players.createSession(newPlayer.body.id, "public key");
|
|
38
|
+
|
|
39
|
+
const transactionIntents = await openfort.transactions.getTransactionIntents();
|
|
40
|
+
for (const intent of transactionIntents.body.data) {
|
|
41
|
+
console.log(`Intent ${intent.id} by ${intent.player}`);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
example().catch((e) => console.error(e));
|
|
46
|
+
```
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
export * from "./contractsApi";
|
|
3
|
+
import { ContractsApi } from "./contractsApi";
|
|
4
|
+
export * from "./defaultApi";
|
|
5
|
+
import { DefaultApi } from "./defaultApi";
|
|
6
|
+
export * from "./logsApi";
|
|
7
|
+
import { LogsApi } from "./logsApi";
|
|
8
|
+
export * from "./playersApi";
|
|
9
|
+
import { PlayersApi } from "./playersApi";
|
|
10
|
+
export * from "./policiesApi";
|
|
11
|
+
import { PoliciesApi } from "./policiesApi";
|
|
12
|
+
export * from "./projectsApi";
|
|
13
|
+
import { ProjectsApi } from "./projectsApi";
|
|
14
|
+
export * from "./sessionsApi";
|
|
15
|
+
import { SessionsApi } from "./sessionsApi";
|
|
16
|
+
export * from "./transactionIntentsApi";
|
|
17
|
+
import { TransactionIntentsApi } from "./transactionIntentsApi";
|
|
18
|
+
import * as http from "http";
|
|
19
|
+
export declare class HttpError extends Error {
|
|
20
|
+
response: http.IncomingMessage;
|
|
21
|
+
body: any;
|
|
22
|
+
statusCode?: number | undefined;
|
|
23
|
+
constructor(response: http.IncomingMessage, body: any, statusCode?: number | undefined);
|
|
24
|
+
}
|
|
25
|
+
export { RequestFile } from "../model/models";
|
|
26
|
+
export declare const APIS: (typeof DefaultApi | typeof LogsApi | typeof PlayersApi | typeof PoliciesApi | typeof ProjectsApi | typeof SessionsApi | typeof TransactionIntentsApi | typeof ContractsApi)[];
|
package/dist/api/apis.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.APIS = exports.HttpError = void 0;
|
|
18
|
+
__exportStar(require("./contractsApi"), exports);
|
|
19
|
+
const contractsApi_1 = require("./contractsApi");
|
|
20
|
+
__exportStar(require("./defaultApi"), exports);
|
|
21
|
+
const defaultApi_1 = require("./defaultApi");
|
|
22
|
+
__exportStar(require("./logsApi"), exports);
|
|
23
|
+
const logsApi_1 = require("./logsApi");
|
|
24
|
+
__exportStar(require("./playersApi"), exports);
|
|
25
|
+
const playersApi_1 = require("./playersApi");
|
|
26
|
+
__exportStar(require("./policiesApi"), exports);
|
|
27
|
+
const policiesApi_1 = require("./policiesApi");
|
|
28
|
+
__exportStar(require("./projectsApi"), exports);
|
|
29
|
+
const projectsApi_1 = require("./projectsApi");
|
|
30
|
+
__exportStar(require("./sessionsApi"), exports);
|
|
31
|
+
const sessionsApi_1 = require("./sessionsApi");
|
|
32
|
+
__exportStar(require("./transactionIntentsApi"), exports);
|
|
33
|
+
const transactionIntentsApi_1 = require("./transactionIntentsApi");
|
|
34
|
+
class HttpError extends Error {
|
|
35
|
+
constructor(response, body, statusCode) {
|
|
36
|
+
super("HTTP request failed");
|
|
37
|
+
this.response = response;
|
|
38
|
+
this.body = body;
|
|
39
|
+
this.statusCode = statusCode;
|
|
40
|
+
this.name = "HttpError";
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.HttpError = HttpError;
|
|
44
|
+
exports.APIS = [
|
|
45
|
+
contractsApi_1.ContractsApi,
|
|
46
|
+
defaultApi_1.DefaultApi,
|
|
47
|
+
logsApi_1.LogsApi,
|
|
48
|
+
playersApi_1.PlayersApi,
|
|
49
|
+
policiesApi_1.PoliciesApi,
|
|
50
|
+
projectsApi_1.ProjectsApi,
|
|
51
|
+
sessionsApi_1.SessionsApi,
|
|
52
|
+
transactionIntentsApi_1.TransactionIntentsApi,
|
|
53
|
+
];
|
|
54
|
+
//# sourceMappingURL=apis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apis.js","sourceRoot":"","sources":["../../src/api/apis.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,iDAA8C;AAC9C,+CAA6B;AAC7B,6CAA0C;AAC1C,4CAA0B;AAC1B,uCAAoC;AACpC,+CAA6B;AAC7B,6CAA0C;AAC1C,gDAA8B;AAC9B,+CAA4C;AAC5C,gDAA8B;AAC9B,+CAA4C;AAC5C,gDAA8B;AAC9B,+CAA4C;AAC5C,0DAAwC;AACxC,mEAAgE;AAGhE,MAAa,SAAU,SAAQ,KAAK;IAClC,YACS,QAA8B,EAC9B,IAAS,EACT,UAAmB;QAE1B,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAJtB,aAAQ,GAAR,QAAQ,CAAsB;QAC9B,SAAI,GAAJ,IAAI,CAAK;QACT,eAAU,GAAV,UAAU,CAAS;QAG1B,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;IAC1B,CAAC;CACF;AATD,8BASC;AAIY,QAAA,IAAI,GAAG;IAClB,2BAAY;IACZ,uBAAU;IACV,iBAAO;IACP,uBAAU;IACV,yBAAW;IACX,yBAAW;IACX,yBAAW;IACX,6CAAqB;CACtB,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Openfort API
|
|
3
|
+
* Complete Openfort API references and guides can be found at: https://openfort.xyz/docs
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: founders@openfort.xyz
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/// <reference types="node" />
|
|
13
|
+
import http from "http";
|
|
14
|
+
import { ContractResponse } from "../model/contractResponse";
|
|
15
|
+
import { ContractResponseAbi } from "../model/contractResponseAbi";
|
|
16
|
+
import { ContractsResponse } from "../model/contractsResponse";
|
|
17
|
+
import { Authentication, Interceptor } from "../model/models";
|
|
18
|
+
import { HttpBearerAuth } from "../model/models";
|
|
19
|
+
export declare enum ContractsApiApiKeys {
|
|
20
|
+
}
|
|
21
|
+
export declare class ContractsApi {
|
|
22
|
+
protected _basePath: string;
|
|
23
|
+
protected _defaultHeaders: any;
|
|
24
|
+
protected _useQuerystring: boolean;
|
|
25
|
+
protected authentications: {
|
|
26
|
+
default: Authentication;
|
|
27
|
+
pk: HttpBearerAuth;
|
|
28
|
+
};
|
|
29
|
+
protected interceptors: Interceptor[];
|
|
30
|
+
constructor(basePath?: string);
|
|
31
|
+
set useQuerystring(value: boolean);
|
|
32
|
+
set basePath(basePath: string);
|
|
33
|
+
set defaultHeaders(defaultHeaders: any);
|
|
34
|
+
get defaultHeaders(): any;
|
|
35
|
+
get basePath(): string;
|
|
36
|
+
setDefaultAuthentication(auth: Authentication): void;
|
|
37
|
+
setApiKey(key: ContractsApiApiKeys, value: string): void;
|
|
38
|
+
set accessToken(accessToken: string | (() => string));
|
|
39
|
+
addInterceptor(interceptor: Interceptor): void;
|
|
40
|
+
/**
|
|
41
|
+
* Creates an contract object.
|
|
42
|
+
* @param name
|
|
43
|
+
* @param chainId
|
|
44
|
+
* @param address
|
|
45
|
+
* @param abi
|
|
46
|
+
* @param publicVerification
|
|
47
|
+
* @param project
|
|
48
|
+
*/
|
|
49
|
+
createContract(name: string, chainId: number, address?: string, abi?: ContractResponseAbi, publicVerification?: boolean, project?: string, options?: {
|
|
50
|
+
headers: {
|
|
51
|
+
[name: string]: string;
|
|
52
|
+
};
|
|
53
|
+
}): Promise<{
|
|
54
|
+
response: http.IncomingMessage;
|
|
55
|
+
body: ContractResponse;
|
|
56
|
+
}>;
|
|
57
|
+
/**
|
|
58
|
+
* Retrieves the details of an existing contract. Supply the unique contract ID from either a contract creation request or the contract list, and Openfort will return the corresponding contract information.
|
|
59
|
+
* @param id Specifies the unique contract ID.
|
|
60
|
+
* @param project Specifies the unique project ID.
|
|
61
|
+
*/
|
|
62
|
+
getContract(id: string, project?: string, options?: {
|
|
63
|
+
headers: {
|
|
64
|
+
[name: string]: string;
|
|
65
|
+
};
|
|
66
|
+
}): Promise<{
|
|
67
|
+
response: http.IncomingMessage;
|
|
68
|
+
body: ContractResponse;
|
|
69
|
+
}>;
|
|
70
|
+
/**
|
|
71
|
+
* Returns a list of your contracts. The contracts are returned sorted by creation date, with the most recently created contracts appearing first.
|
|
72
|
+
* @param project Specifies the unique project ID.
|
|
73
|
+
*/
|
|
74
|
+
getContracts(project?: string, options?: {
|
|
75
|
+
headers: {
|
|
76
|
+
[name: string]: string;
|
|
77
|
+
};
|
|
78
|
+
}): Promise<{
|
|
79
|
+
response: http.IncomingMessage;
|
|
80
|
+
body: ContractsResponse;
|
|
81
|
+
}>;
|
|
82
|
+
}
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Openfort API
|
|
4
|
+
* Complete Openfort API references and guides can be found at: https://openfort.xyz/docs
|
|
5
|
+
*
|
|
6
|
+
* The version of the OpenAPI document: 1.0.0
|
|
7
|
+
* Contact: founders@openfort.xyz
|
|
8
|
+
*
|
|
9
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
+
* https://openapi-generator.tech
|
|
11
|
+
* Do not edit the class manually.
|
|
12
|
+
*/
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ContractsApi = exports.ContractsApiApiKeys = void 0;
|
|
18
|
+
const request_1 = __importDefault(require("request"));
|
|
19
|
+
const models_1 = require("../model/models");
|
|
20
|
+
const models_2 = require("../model/models");
|
|
21
|
+
const apis_1 = require("./apis");
|
|
22
|
+
let defaultBasePath = "https://api.openfort.xyz";
|
|
23
|
+
// ===============================================
|
|
24
|
+
// This file is autogenerated - Please do not edit
|
|
25
|
+
// ===============================================
|
|
26
|
+
var ContractsApiApiKeys;
|
|
27
|
+
(function (ContractsApiApiKeys) {
|
|
28
|
+
})(ContractsApiApiKeys = exports.ContractsApiApiKeys || (exports.ContractsApiApiKeys = {}));
|
|
29
|
+
class ContractsApi {
|
|
30
|
+
constructor(basePathOrUsername, password, basePath) {
|
|
31
|
+
this._basePath = defaultBasePath;
|
|
32
|
+
this._defaultHeaders = {};
|
|
33
|
+
this._useQuerystring = false;
|
|
34
|
+
this.authentications = {
|
|
35
|
+
default: new models_1.VoidAuth(),
|
|
36
|
+
pk: new models_2.HttpBearerAuth(),
|
|
37
|
+
};
|
|
38
|
+
this.interceptors = [];
|
|
39
|
+
if (password) {
|
|
40
|
+
if (basePath) {
|
|
41
|
+
this.basePath = basePath;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
if (basePathOrUsername) {
|
|
46
|
+
this.basePath = basePathOrUsername;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
set useQuerystring(value) {
|
|
51
|
+
this._useQuerystring = value;
|
|
52
|
+
}
|
|
53
|
+
set basePath(basePath) {
|
|
54
|
+
this._basePath = basePath;
|
|
55
|
+
}
|
|
56
|
+
set defaultHeaders(defaultHeaders) {
|
|
57
|
+
this._defaultHeaders = defaultHeaders;
|
|
58
|
+
}
|
|
59
|
+
get defaultHeaders() {
|
|
60
|
+
return this._defaultHeaders;
|
|
61
|
+
}
|
|
62
|
+
get basePath() {
|
|
63
|
+
return this._basePath;
|
|
64
|
+
}
|
|
65
|
+
setDefaultAuthentication(auth) {
|
|
66
|
+
this.authentications.default = auth;
|
|
67
|
+
}
|
|
68
|
+
setApiKey(key, value) {
|
|
69
|
+
this.authentications[ContractsApiApiKeys[key]].apiKey = value;
|
|
70
|
+
}
|
|
71
|
+
set accessToken(accessToken) {
|
|
72
|
+
this.authentications.pk.accessToken = accessToken;
|
|
73
|
+
}
|
|
74
|
+
addInterceptor(interceptor) {
|
|
75
|
+
this.interceptors.push(interceptor);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Creates an contract object.
|
|
79
|
+
* @param name
|
|
80
|
+
* @param chainId
|
|
81
|
+
* @param address
|
|
82
|
+
* @param abi
|
|
83
|
+
* @param publicVerification
|
|
84
|
+
* @param project
|
|
85
|
+
*/
|
|
86
|
+
async createContract(name, chainId, address, abi, publicVerification, project, options = { headers: {} }) {
|
|
87
|
+
const localVarPath = this.basePath + "/v1/contracts";
|
|
88
|
+
let localVarQueryParameters = {};
|
|
89
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
90
|
+
const produces = ["application/json"];
|
|
91
|
+
// give precedence to 'application/json'
|
|
92
|
+
if (produces.indexOf("application/json") >= 0) {
|
|
93
|
+
localVarHeaderParams.Accept = "application/json";
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
localVarHeaderParams.Accept = produces.join(",");
|
|
97
|
+
}
|
|
98
|
+
let localVarFormParams = {};
|
|
99
|
+
// verify required parameter 'name' is not null or undefined
|
|
100
|
+
if (name === null || name === undefined) {
|
|
101
|
+
throw new Error("Required parameter name was null or undefined when calling createContract.");
|
|
102
|
+
}
|
|
103
|
+
// verify required parameter 'chainId' is not null or undefined
|
|
104
|
+
if (chainId === null || chainId === undefined) {
|
|
105
|
+
throw new Error("Required parameter chainId was null or undefined when calling createContract.");
|
|
106
|
+
}
|
|
107
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
108
|
+
let localVarUseFormData = false;
|
|
109
|
+
if (name !== undefined) {
|
|
110
|
+
localVarFormParams["name"] = models_1.ObjectSerializer.serialize(name, "string");
|
|
111
|
+
}
|
|
112
|
+
if (chainId !== undefined) {
|
|
113
|
+
localVarFormParams["chain_id"] = models_1.ObjectSerializer.serialize(chainId, "number");
|
|
114
|
+
}
|
|
115
|
+
if (address !== undefined) {
|
|
116
|
+
localVarFormParams["address"] = models_1.ObjectSerializer.serialize(address, "string");
|
|
117
|
+
}
|
|
118
|
+
if (abi !== undefined) {
|
|
119
|
+
localVarFormParams["abi"] = models_1.ObjectSerializer.serialize(abi, "ContractResponseAbi");
|
|
120
|
+
}
|
|
121
|
+
if (publicVerification !== undefined) {
|
|
122
|
+
localVarFormParams["public_verification"] = models_1.ObjectSerializer.serialize(publicVerification, "boolean");
|
|
123
|
+
}
|
|
124
|
+
if (project !== undefined) {
|
|
125
|
+
localVarFormParams["project"] = models_1.ObjectSerializer.serialize(project, "string");
|
|
126
|
+
}
|
|
127
|
+
let localVarRequestOptions = {
|
|
128
|
+
method: "POST",
|
|
129
|
+
qs: localVarQueryParameters,
|
|
130
|
+
headers: localVarHeaderParams,
|
|
131
|
+
uri: localVarPath,
|
|
132
|
+
useQuerystring: this._useQuerystring,
|
|
133
|
+
json: true,
|
|
134
|
+
};
|
|
135
|
+
let authenticationPromise = Promise.resolve();
|
|
136
|
+
if (this.authentications.pk.accessToken) {
|
|
137
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.pk.applyToRequest(localVarRequestOptions));
|
|
138
|
+
}
|
|
139
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
140
|
+
let interceptorPromise = authenticationPromise;
|
|
141
|
+
for (const interceptor of this.interceptors) {
|
|
142
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
143
|
+
}
|
|
144
|
+
return interceptorPromise.then(() => {
|
|
145
|
+
if (Object.keys(localVarFormParams).length) {
|
|
146
|
+
if (localVarUseFormData) {
|
|
147
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return new Promise((resolve, reject) => {
|
|
154
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
155
|
+
if (error) {
|
|
156
|
+
reject(error);
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
if (response.statusCode &&
|
|
160
|
+
response.statusCode >= 200 &&
|
|
161
|
+
response.statusCode <= 299) {
|
|
162
|
+
body = models_1.ObjectSerializer.deserialize(body, "ContractResponse");
|
|
163
|
+
resolve({ response: response, body: body });
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Retrieves the details of an existing contract. Supply the unique contract ID from either a contract creation request or the contract list, and Openfort will return the corresponding contract information.
|
|
175
|
+
* @param id Specifies the unique contract ID.
|
|
176
|
+
* @param project Specifies the unique project ID.
|
|
177
|
+
*/
|
|
178
|
+
async getContract(id, project, options = { headers: {} }) {
|
|
179
|
+
const localVarPath = this.basePath +
|
|
180
|
+
"/v1/contracts/{id}".replace("{" + "id" + "}", encodeURIComponent(String(id)));
|
|
181
|
+
let localVarQueryParameters = {};
|
|
182
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
183
|
+
const produces = ["application/json"];
|
|
184
|
+
// give precedence to 'application/json'
|
|
185
|
+
if (produces.indexOf("application/json") >= 0) {
|
|
186
|
+
localVarHeaderParams.Accept = "application/json";
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
localVarHeaderParams.Accept = produces.join(",");
|
|
190
|
+
}
|
|
191
|
+
let localVarFormParams = {};
|
|
192
|
+
// verify required parameter 'id' is not null or undefined
|
|
193
|
+
if (id === null || id === undefined) {
|
|
194
|
+
throw new Error("Required parameter id was null or undefined when calling getContract.");
|
|
195
|
+
}
|
|
196
|
+
if (project !== undefined) {
|
|
197
|
+
localVarQueryParameters["project"] = models_1.ObjectSerializer.serialize(project, "string");
|
|
198
|
+
}
|
|
199
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
200
|
+
let localVarUseFormData = false;
|
|
201
|
+
let localVarRequestOptions = {
|
|
202
|
+
method: "GET",
|
|
203
|
+
qs: localVarQueryParameters,
|
|
204
|
+
headers: localVarHeaderParams,
|
|
205
|
+
uri: localVarPath,
|
|
206
|
+
useQuerystring: this._useQuerystring,
|
|
207
|
+
json: true,
|
|
208
|
+
};
|
|
209
|
+
let authenticationPromise = Promise.resolve();
|
|
210
|
+
if (this.authentications.pk.accessToken) {
|
|
211
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.pk.applyToRequest(localVarRequestOptions));
|
|
212
|
+
}
|
|
213
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
214
|
+
let interceptorPromise = authenticationPromise;
|
|
215
|
+
for (const interceptor of this.interceptors) {
|
|
216
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
217
|
+
}
|
|
218
|
+
return interceptorPromise.then(() => {
|
|
219
|
+
if (Object.keys(localVarFormParams).length) {
|
|
220
|
+
if (localVarUseFormData) {
|
|
221
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return new Promise((resolve, reject) => {
|
|
228
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
229
|
+
if (error) {
|
|
230
|
+
reject(error);
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
if (response.statusCode &&
|
|
234
|
+
response.statusCode >= 200 &&
|
|
235
|
+
response.statusCode <= 299) {
|
|
236
|
+
body = models_1.ObjectSerializer.deserialize(body, "ContractResponse");
|
|
237
|
+
resolve({ response: response, body: body });
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
});
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Returns a list of your contracts. The contracts are returned sorted by creation date, with the most recently created contracts appearing first.
|
|
249
|
+
* @param project Specifies the unique project ID.
|
|
250
|
+
*/
|
|
251
|
+
async getContracts(project, options = { headers: {} }) {
|
|
252
|
+
const localVarPath = this.basePath + "/v1/contracts";
|
|
253
|
+
let localVarQueryParameters = {};
|
|
254
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
255
|
+
const produces = ["application/json"];
|
|
256
|
+
// give precedence to 'application/json'
|
|
257
|
+
if (produces.indexOf("application/json") >= 0) {
|
|
258
|
+
localVarHeaderParams.Accept = "application/json";
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
localVarHeaderParams.Accept = produces.join(",");
|
|
262
|
+
}
|
|
263
|
+
let localVarFormParams = {};
|
|
264
|
+
if (project !== undefined) {
|
|
265
|
+
localVarQueryParameters["project"] = models_1.ObjectSerializer.serialize(project, "string");
|
|
266
|
+
}
|
|
267
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
268
|
+
let localVarUseFormData = false;
|
|
269
|
+
let localVarRequestOptions = {
|
|
270
|
+
method: "GET",
|
|
271
|
+
qs: localVarQueryParameters,
|
|
272
|
+
headers: localVarHeaderParams,
|
|
273
|
+
uri: localVarPath,
|
|
274
|
+
useQuerystring: this._useQuerystring,
|
|
275
|
+
json: true,
|
|
276
|
+
};
|
|
277
|
+
let authenticationPromise = Promise.resolve();
|
|
278
|
+
if (this.authentications.pk.accessToken) {
|
|
279
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.pk.applyToRequest(localVarRequestOptions));
|
|
280
|
+
}
|
|
281
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
282
|
+
let interceptorPromise = authenticationPromise;
|
|
283
|
+
for (const interceptor of this.interceptors) {
|
|
284
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
285
|
+
}
|
|
286
|
+
return interceptorPromise.then(() => {
|
|
287
|
+
if (Object.keys(localVarFormParams).length) {
|
|
288
|
+
if (localVarUseFormData) {
|
|
289
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
return new Promise((resolve, reject) => {
|
|
296
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
297
|
+
if (error) {
|
|
298
|
+
reject(error);
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
if (response.statusCode &&
|
|
302
|
+
response.statusCode >= 200 &&
|
|
303
|
+
response.statusCode <= 299) {
|
|
304
|
+
body = models_1.ObjectSerializer.deserialize(body, "ContractsResponse");
|
|
305
|
+
resolve({ response: response, body: body });
|
|
306
|
+
}
|
|
307
|
+
else {
|
|
308
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
});
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
exports.ContractsApi = ContractsApi;
|
|
317
|
+
//# sourceMappingURL=contractsApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contractsApi.js","sourceRoot":"","sources":["../../src/api/contractsApi.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;AAEH,sDAAsC;AAQtC,4CAKyB;AACzB,4CAKyB;AAEzB,iCAAgD;AAEhD,IAAI,eAAe,GAAG,0BAA0B,CAAC;AAEjD,kDAAkD;AAClD,kDAAkD;AAClD,kDAAkD;AAElD,IAAY,mBAAsB;AAAlC,WAAY,mBAAmB;AAAE,CAAC,EAAtB,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAAG;AAElC,MAAa,YAAY;IAavB,YACE,kBAA0B,EAC1B,QAAiB,EACjB,QAAiB;QAfT,cAAS,GAAG,eAAe,CAAC;QAC5B,oBAAe,GAAQ,EAAE,CAAC;QAC1B,oBAAe,GAAY,KAAK,CAAC;QAEjC,oBAAe,GAAG;YAC1B,OAAO,EAAkB,IAAI,iBAAQ,EAAE;YACvC,EAAE,EAAE,IAAI,uBAAc,EAAE;SACzB,CAAC;QAEQ,iBAAY,GAAkB,EAAE,CAAC;QAQzC,IAAI,QAAQ,EAAE;YACZ,IAAI,QAAQ,EAAE;gBACZ,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;aAC1B;SACF;aAAM;YACL,IAAI,kBAAkB,EAAE;gBACtB,IAAI,CAAC,QAAQ,GAAG,kBAAkB,CAAC;aACpC;SACF;IACH,CAAC;IAED,IAAI,cAAc,CAAC,KAAc;QAC/B,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;IAC/B,CAAC;IAED,IAAI,QAAQ,CAAC,QAAgB;QAC3B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAED,I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