Comparing version 0.0.2 to 0.0.3
import algosdk, { ABIValue } from "algosdk"; | ||
import { Schema } from "../generate/"; | ||
import { Schema } from "../"; | ||
export declare type MethodArg = algosdk.ABIArgument | algosdk.Transaction | object | MethodArg[]; | ||
@@ -4,0 +4,0 @@ export declare type MethodArgs = { |
@@ -55,3 +55,3 @@ "use strict"; | ||
var algosdk_1 = __importDefault(require("algosdk")); | ||
var generate_1 = require("../generate/"); | ||
var __1 = require("../"); | ||
var logic_error_1 = require("./logic_error"); | ||
@@ -383,7 +383,7 @@ function decodeNamedTuple(v, keys) { | ||
ApplicationClient.prototype.getLocalSchema = function () { | ||
var s = (0, generate_1.getStateSchema)(this.acctSchema); | ||
var s = (0, __1.getStateSchema)(this.acctSchema); | ||
return { numLocalInts: s.uints, numLocalByteSlices: s.bytes }; | ||
}; | ||
ApplicationClient.prototype.getGlobalSchema = function () { | ||
var s = (0, generate_1.getStateSchema)(this.appSchema); | ||
var s = (0, __1.getStateSchema)(this.appSchema); | ||
return { numGlobalInts: s.uints, numGlobalByteSlices: s.bytes }; | ||
@@ -390,0 +390,0 @@ }; |
@@ -39,3 +39,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var sandbox_1 = require("../../sandbox"); | ||
var __1 = require("../../"); | ||
var demoavm7_client_1 = require("./demoavm7_client"); | ||
@@ -47,7 +47,7 @@ (function () { | ||
switch (_b.label) { | ||
case 0: return [4 /*yield*/, (0, sandbox_1.getAccounts)()]; | ||
case 0: return [4 /*yield*/, (0, __1.getAccounts)()]; | ||
case 1: | ||
acct = (_b.sent()).pop(); | ||
appClient = new demoavm7_client_1.DemoAVM7({ | ||
client: (0, sandbox_1.getAlgodClient)(), | ||
client: (0, __1.getAlgodClient)(), | ||
signer: acct.signer, | ||
@@ -54,0 +54,0 @@ sender: acct.addr, |
import algosdk from "algosdk"; | ||
import { ApplicationClient, ABIResult } from "../../application_client/"; | ||
import { Schema } from "../../generate/"; | ||
import { ApplicationClient, ABIResult, Schema } from "../../"; | ||
export declare type BlockDetails = { | ||
@@ -5,0 +4,0 @@ ts: number; |
@@ -59,3 +59,3 @@ "use strict"; | ||
var algosdk_1 = __importDefault(require("algosdk")); | ||
var application_client_1 = require("../../application_client/"); | ||
var __1 = require("../../"); | ||
var DemoAVM7 = /** @class */ (function (_super) { | ||
@@ -90,3 +90,3 @@ __extends(DemoAVM7, _super); | ||
result = _a.sent(); | ||
return [2 /*return*/, new application_client_1.ABIResult(result)]; | ||
return [2 /*return*/, new __1.ABIResult(result)]; | ||
} | ||
@@ -104,3 +104,3 @@ }); | ||
result = _a.sent(); | ||
return [2 /*return*/, new application_client_1.ABIResult(result)]; | ||
return [2 /*return*/, new __1.ABIResult(result)]; | ||
} | ||
@@ -118,3 +118,3 @@ }); | ||
result = _a.sent(); | ||
return [2 /*return*/, new application_client_1.ABIResult(result)]; | ||
return [2 /*return*/, new __1.ABIResult(result)]; | ||
} | ||
@@ -132,3 +132,3 @@ }); | ||
result = _a.sent(); | ||
return [2 /*return*/, new application_client_1.ABIResult(result, (0, application_client_1.decodeNamedTuple)(result.returnValue, ["ts", "seed"]))]; | ||
return [2 /*return*/, new __1.ABIResult(result, (0, __1.decodeNamedTuple)(result.returnValue, ["ts", "seed"]))]; | ||
} | ||
@@ -146,3 +146,3 @@ }); | ||
result = _a.sent(); | ||
return [2 /*return*/, new application_client_1.ABIResult(result)]; | ||
return [2 /*return*/, new __1.ABIResult(result)]; | ||
} | ||
@@ -160,3 +160,3 @@ }); | ||
result = _a.sent(); | ||
return [2 /*return*/, new application_client_1.ABIResult(result)]; | ||
return [2 /*return*/, new __1.ABIResult(result)]; | ||
} | ||
@@ -174,3 +174,3 @@ }); | ||
result = _a.sent(); | ||
return [2 /*return*/, new application_client_1.ABIResult(result, (0, application_client_1.decodeNamedTuple)(result.returnValue, ["string_key", "uint_key", "obj_key"]))]; | ||
return [2 /*return*/, new __1.ABIResult(result, (0, __1.decodeNamedTuple)(result.returnValue, ["string_key", "uint_key", "obj_key"]))]; | ||
} | ||
@@ -188,3 +188,3 @@ }); | ||
result = _a.sent(); | ||
return [2 /*return*/, new application_client_1.ABIResult(result)]; | ||
return [2 /*return*/, new __1.ABIResult(result)]; | ||
} | ||
@@ -195,3 +195,3 @@ }); | ||
return DemoAVM7; | ||
}(application_client_1.ApplicationClient)); | ||
}(__1.ApplicationClient)); | ||
exports.DemoAVM7 = DemoAVM7; |
@@ -39,3 +39,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var sandbox_1 = require("../../sandbox/"); | ||
var __1 = require("../../"); | ||
var hellobeaker_client_1 = require("./hellobeaker_client"); | ||
@@ -47,7 +47,7 @@ (function () { | ||
switch (_b.label) { | ||
case 0: return [4 /*yield*/, (0, sandbox_1.getAccounts)()]; | ||
case 0: return [4 /*yield*/, (0, __1.getAccounts)()]; | ||
case 1: | ||
acct = (_b.sent()).pop(); | ||
appClient = new hellobeaker_client_1.HelloBeaker({ | ||
client: (0, sandbox_1.getAlgodClient)(), | ||
client: (0, __1.getAlgodClient)(), | ||
signer: acct.signer, | ||
@@ -54,0 +54,0 @@ sender: acct.addr, |
import algosdk from "algosdk"; | ||
import { ApplicationClient, ABIResult } from "../../application_client/"; | ||
import { Schema } from "../../generate/"; | ||
import { ApplicationClient, ABIResult, Schema } from "../../"; | ||
export declare class HelloBeaker extends ApplicationClient { | ||
@@ -5,0 +4,0 @@ desc: string; |
@@ -59,3 +59,3 @@ "use strict"; | ||
var algosdk_1 = __importDefault(require("algosdk")); | ||
var application_client_1 = require("../../application_client/"); | ||
var __1 = require("../../"); | ||
var HelloBeaker = /** @class */ (function (_super) { | ||
@@ -83,3 +83,3 @@ __extends(HelloBeaker, _super); | ||
result = _a.sent(); | ||
return [2 /*return*/, new application_client_1.ABIResult(result)]; | ||
return [2 /*return*/, new __1.ABIResult(result)]; | ||
} | ||
@@ -90,3 +90,3 @@ }); | ||
return HelloBeaker; | ||
}(application_client_1.ApplicationClient)); | ||
}(__1.ApplicationClient)); | ||
exports.HelloBeaker = HelloBeaker; |
import algosdk from "algosdk"; | ||
import { ApplicationClient, ABIResult } from "../../application_client/"; | ||
import { Schema } from "../../generate/"; | ||
import { ApplicationClient, ABIResult, Schema } from "../../"; | ||
export declare class ExpensiveApp extends ApplicationClient { | ||
@@ -5,0 +4,0 @@ desc: string; |
@@ -59,4 +59,3 @@ "use strict"; | ||
var algosdk_1 = __importDefault(require("algosdk")); | ||
var application_client_1 = require("../../application_client/"); | ||
var generate_1 = require("../../generate/"); | ||
var __1 = require("../../"); | ||
var ExpensiveApp = /** @class */ (function (_super) { | ||
@@ -67,3 +66,3 @@ __extends(ExpensiveApp, _super); | ||
_this.desc = ""; | ||
_this.appSchema = { declared: { opup_app_id: { type: generate_1.AVMType.uint64, key: "ouaid", desc: "", static: false } }, dynamic: {} }; | ||
_this.appSchema = { declared: { opup_app_id: { type: __1.AVMType.uint64, key: "ouaid", desc: "", static: false } }, dynamic: {} }; | ||
_this.acctSchema = { declared: {}, dynamic: {} }; | ||
@@ -86,3 +85,3 @@ _this.approvalProgram = "I3ByYWdtYSB2ZXJzaW9uIDcKaW50Y2Jsb2NrIDAgMSA2CmJ5dGVjYmxvY2sgMHg2Zjc1NjE2OTY0IDB4MTUxZjdjNzUKdHhuIE51bUFwcEFyZ3MKaW50Y18wIC8vIDAKPT0KYm56IG1haW5fbDYKdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMApwdXNoYnl0ZXMgMHg2MjI4YzY4MiAvLyAiaGFzaF9pdChzdHJpbmcsdWludDY0LGFwcGxpY2F0aW9uKWJ5dGVbMzJdIgo9PQpibnogbWFpbl9sNQp0eG5hIEFwcGxpY2F0aW9uQXJncyAwCnB1c2hieXRlcyAweDEwMWNlYTAwIC8vICJvcHVwX2Jvb3RzdHJhcChwYXkpdWludDY0Igo9PQpibnogbWFpbl9sNAplcnIKbWFpbl9sNDoKdHhuIE9uQ29tcGxldGlvbgppbnRjXzAgLy8gTm9PcAo9PQp0eG4gQXBw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yZWF0ZW9wdXBfMzoKaXR4bl9iZWdpbgppbnRjXzIgLy8gYXBwbAppdHhuX2ZpZWxkIFR5cGVFbnVtCnB1c2hieXRlcyAweDA2MzEwMDMyMDkxMjQzIC8vIGJhc2U2NChCakVBTWdrU1F3PT0pCml0eG5fZmllbGQgQXBwcm92YWxQcm9ncmFtCnB1c2hieXRlcyAweDA2ODEwMTQzIC8vIGJhc2U2NChCb0VCUXc9PSkKaXR4bl9maWVsZCBDbGVhclN0YXRlUHJvZ3JhbQppbnRjXzAgLy8gMAppdHhuX2ZpZWxkIEZlZQppdHhuX3N1Ym1pdAppbnRjXzAgLy8gMApieXRlY18wIC8vICJvdWFpZCIKYXBwX2dsb2JhbF9nZXRfZXgKc3RvcmUgMTQKc3RvcmUgMTMKbG9hZCAxNAohCmFzc2VydApieXRlY18wIC8vICJvdWFpZCIKaXR4biBDcmVhdGVkQXBwbGljYXRpb25JRAphcHBfZ2xvYmFsX3B1dApyZXRzdWIKCi8vIG9wdXBfYm9vdHN0cmFwCm9wdXBib290c3RyYXBfNDoKZ3R4bnMgQW1vdW50CnB1c2hpbnQgMTAwMDAwIC8vIDEwMDAwMAo+PQphc3NlcnQKY2FsbHN1YiBjcmVhdGVvcHVwXzMKYnl0ZWNfMCAvLyAib3VhaWQiCmFwcF9nbG9iYWxfZ2V0CnJldHN1Yg=="; | ||
result = _a.sent(); | ||
return [2 /*return*/, new application_client_1.ABIResult(result)]; | ||
return [2 /*return*/, new __1.ABIResult(result)]; | ||
} | ||
@@ -100,3 +99,3 @@ }); | ||
result = _a.sent(); | ||
return [2 /*return*/, new application_client_1.ABIResult(result)]; | ||
return [2 /*return*/, new __1.ABIResult(result)]; | ||
} | ||
@@ -107,3 +106,3 @@ }); | ||
return ExpensiveApp; | ||
}(application_client_1.ApplicationClient)); | ||
}(__1.ApplicationClient)); | ||
exports.ExpensiveApp = ExpensiveApp; |
@@ -39,3 +39,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var sandbox_1 = require("../../sandbox/"); | ||
var __1 = require("../../"); | ||
var structer_client_1 = require("./structer_client"); | ||
@@ -47,7 +47,7 @@ (function () { | ||
switch (_b.label) { | ||
case 0: return [4 /*yield*/, (0, sandbox_1.getAccounts)()]; | ||
case 0: return [4 /*yield*/, (0, __1.getAccounts)()]; | ||
case 1: | ||
acct = (_b.sent()).pop(); | ||
appClient = new structer_client_1.Structer({ | ||
client: (0, sandbox_1.getAlgodClient)(), | ||
client: (0, __1.getAlgodClient)(), | ||
signer: acct.signer, | ||
@@ -54,0 +54,0 @@ sender: acct.addr, |
import algosdk from "algosdk"; | ||
import { ApplicationClient, ABIResult } from "../../application_client/"; | ||
import { Schema } from "../../generate/"; | ||
import { ApplicationClient, ABIResult, Schema } from "../.."; | ||
export declare type Order = { | ||
@@ -5,0 +4,0 @@ item: string; |
@@ -59,4 +59,3 @@ "use strict"; | ||
var algosdk_1 = __importDefault(require("algosdk")); | ||
var application_client_1 = require("../../application_client/"); | ||
var generate_1 = require("../../generate/"); | ||
var __1 = require("../.."); | ||
var Structer = /** @class */ (function (_super) { | ||
@@ -68,3 +67,3 @@ __extends(Structer, _super); | ||
_this.appSchema = { declared: {}, dynamic: {} }; | ||
_this.acctSchema = { declared: {}, dynamic: { orders: { type: generate_1.AVMType.bytes, desc: "", max_keys: 16 } } }; | ||
_this.acctSchema = { declared: {}, dynamic: { orders: { type: __1.AVMType.bytes, desc: "", max_keys: 16 } } }; | ||
_this.approvalProgram = "I3ByYWdtYSB2ZXJzaW9uIDcKaW50Y2Jsb2NrIDAgMQpieXRlY2Jsb2NrIDB4MDAgMHgxNTFmN2M3NQp0eG4gTnVtQXBwQXJncwppbnRjXzAgLy8gMAo9PQpibnogbWFpbl9sOAp0eG5hIEFwcGxpY2F0aW9uQXJncyAwCnB1c2hieXRlcyAweDNmY2EzYTQ5IC8vICJyZWFkX2l0ZW0odWludDgpKHN0cmluZyx1aW50MTYpIgo9PQpibnogbWFpbl9sNwp0eG5hI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TYKc3RvcmUgNwpsb2FkIDcKaW50Y18xIC8vIDEKKwpzdG9yZSA3CmxvYWQgNwpwdXNoaW50IDY1NTM2IC8vIDY1NTM2CjwKYXNzZXJ0CmxvYWQgNgpsb2FkIDYKaW50Y18wIC8vIDAKZXh0cmFjdF91aW50MTYKZGlnIDEKbGVuCnN1YnN0cmluZzMKc3RvcmUgOApwdXNoaW50IDQgLy8gNAppdG9iCmV4dHJhY3QgNiAwCmxvYWQgNwppdG9iCmV4dHJhY3QgNiAwCmNvbmNhdApsb2FkIDgKY29uY2F0CnN0b3JlIDYKdHhuIFNlbmRlcgpieXRlY18wIC8vIDB4MDAKaW50Y18wIC8vIDAKbG9hZCA1CnNldGJ5dGUKbG9hZCA2CmFwcF9sb2NhbF9wdXQKbG9hZCA2CnJldHN1Yg=="; | ||
@@ -87,3 +86,3 @@ _this.clearProgram = "I3ByYWdtYSB2ZXJzaW9uIDcKcHVzaGludCAwIC8vIDAKcmV0dXJu"; | ||
result = _a.sent(); | ||
return [2 /*return*/, new application_client_1.ABIResult(result, (0, application_client_1.decodeNamedTuple)(result.returnValue, ["item", "quantity"]))]; | ||
return [2 /*return*/, new __1.ABIResult(result, (0, __1.decodeNamedTuple)(result.returnValue, ["item", "quantity"]))]; | ||
} | ||
@@ -101,3 +100,3 @@ }); | ||
result = _a.sent(); | ||
return [2 /*return*/, new application_client_1.ABIResult(result)]; | ||
return [2 /*return*/, new __1.ABIResult(result)]; | ||
} | ||
@@ -115,3 +114,3 @@ }); | ||
result = _a.sent(); | ||
return [2 /*return*/, new application_client_1.ABIResult(result, (0, application_client_1.decodeNamedTuple)(result.returnValue, ["item", "quantity"]))]; | ||
return [2 /*return*/, new __1.ABIResult(result, (0, __1.decodeNamedTuple)(result.returnValue, ["item", "quantity"]))]; | ||
} | ||
@@ -122,3 +121,3 @@ }); | ||
return Structer; | ||
}(application_client_1.ApplicationClient)); | ||
}(__1.ApplicationClient)); | ||
exports.Structer = Structer; |
@@ -7,3 +7,3 @@ #!/usr/bin/env ts-node | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var generate_1 = require("./generate/"); | ||
var _1 = require("./"); | ||
var fs_1 = __importDefault(require("fs")); | ||
@@ -15,2 +15,2 @@ // TODO: make this friendly | ||
var spec = args[args.length - 2]; | ||
(0, generate_1.generateApplicationClient)(JSON.parse(fs_1.default.readFileSync(spec).toString()), path); | ||
(0, _1.generateApplicationClient)(JSON.parse(fs_1.default.readFileSync(spec).toString()), path); |
import { AppSpec } from "./appspec"; | ||
export default function generateApplicationClient(appSpec: AppSpec, path: string): void; | ||
export declare function generateApplicationClient(appSpec: AppSpec, path: string): void; |
@@ -35,2 +35,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.generateApplicationClient = void 0; | ||
var typescript_1 = __importStar(require("typescript")); | ||
@@ -41,6 +42,4 @@ var fs_1 = require("fs"); | ||
var CLIENT_NAME = "ApplicationClient"; | ||
var CLIENT_IMPORTS = "{".concat(CLIENT_NAME, ", ABIResult, decodeNamedTuple}"); | ||
var CLIENT_PATH = "../../application_client/"; | ||
var APP_SPEC_IMPORTS = "{Schema,AVMType}"; | ||
var APP_SPEC_PATH = "../../generate/"; | ||
var CLIENT_IMPORTS = "{".concat(CLIENT_NAME, ", ABIResult, decodeNamedTuple, Schema, AVMType}"); | ||
var CLIENT_PATH = "beaker-ts"; | ||
var ALGOSDK_IMPORTS = "algosdk"; | ||
@@ -81,3 +80,3 @@ var ALGOSDK_PATH = "algosdk"; | ||
} | ||
exports.default = generateApplicationClient; | ||
exports.generateApplicationClient = generateApplicationClient; | ||
// create the imports for the generated client | ||
@@ -90,4 +89,2 @@ function generateImports() { | ||
typescript_1.factory.createImportDeclaration(undefined, undefined, typescript_1.factory.createImportClause(false, typescript_1.factory.createIdentifier(CLIENT_IMPORTS), undefined), typescript_1.factory.createStringLiteral(CLIENT_PATH), undefined), | ||
// Import app spec stuff | ||
typescript_1.factory.createImportDeclaration(undefined, undefined, typescript_1.factory.createImportClause(false, typescript_1.factory.createIdentifier(APP_SPEC_IMPORTS), undefined), typescript_1.factory.createStringLiteral(APP_SPEC_PATH), undefined), | ||
]; | ||
@@ -94,0 +91,0 @@ } |
@@ -1,3 +0,2 @@ | ||
import generateApplicationClient from "./generate"; | ||
import { HintSpec, DeclaredSchemaValueSpec, DynamicSchemaValueSpec, Schema, StateSchema, SchemaSpec, AppSources, AppSpec, AVMType, getStateSchema } from "./appspec"; | ||
export { generateApplicationClient, HintSpec, DeclaredSchemaValueSpec, DynamicSchemaValueSpec, Schema, StateSchema, SchemaSpec, AppSources, AppSpec, AVMType, getStateSchema }; | ||
export { generateApplicationClient } from "./generate"; | ||
export { HintSpec, DeclaredSchemaValueSpec, DynamicSchemaValueSpec, Schema, StateSchema, SchemaSpec, AppSources, AppSpec, AVMType, getStateSchema } from "./appspec"; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getStateSchema = exports.AVMType = exports.generateApplicationClient = void 0; | ||
var generate_1 = __importDefault(require("./generate")); | ||
exports.generateApplicationClient = generate_1.default; | ||
var generate_1 = require("./generate"); | ||
Object.defineProperty(exports, "generateApplicationClient", { enumerable: true, get: function () { return generate_1.generateApplicationClient; } }); | ||
var appspec_1 = require("./appspec"); | ||
Object.defineProperty(exports, "AVMType", { enumerable: true, get: function () { return appspec_1.AVMType; } }); | ||
Object.defineProperty(exports, "getStateSchema", { enumerable: true, get: function () { return appspec_1.getStateSchema; } }); |
@@ -1,4 +0,6 @@ | ||
import * as generate from './generate'; | ||
import * as sandbox from './sandbox'; | ||
import * as application_client from './application_client'; | ||
export { generate, sandbox, application_client }; | ||
export { ApplicationClient, ABIResult, MethodArg, MethodArgs, decodeNamedTuple } from "./application_client/application_client"; | ||
export { LogicError } from "./application_client/logic_error"; | ||
export { generateApplicationClient } from "./generate/generate"; | ||
export { HintSpec, DeclaredSchemaValueSpec, DynamicSchemaValueSpec, Schema, StateSchema, SchemaSpec, AppSources, AppSpec, AVMType, getStateSchema } from "./generate/appspec"; | ||
export { getAlgodClient, getIndexerClient } from "./sandbox/clients"; | ||
export { getAccounts } from "./sandbox/accounts"; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.application_client = exports.sandbox = exports.generate = void 0; | ||
var generate = __importStar(require("./generate")); | ||
exports.generate = generate; | ||
var sandbox = __importStar(require("./sandbox")); | ||
exports.sandbox = sandbox; | ||
var application_client = __importStar(require("./application_client")); | ||
exports.application_client = application_client; | ||
exports.getAccounts = exports.getIndexerClient = exports.getAlgodClient = exports.getStateSchema = exports.AVMType = exports.generateApplicationClient = exports.LogicError = exports.decodeNamedTuple = exports.ABIResult = exports.ApplicationClient = void 0; | ||
var application_client_1 = require("./application_client/application_client"); | ||
Object.defineProperty(exports, "ApplicationClient", { enumerable: true, get: function () { return application_client_1.ApplicationClient; } }); | ||
Object.defineProperty(exports, "ABIResult", { enumerable: true, get: function () { return application_client_1.ABIResult; } }); | ||
Object.defineProperty(exports, "decodeNamedTuple", { enumerable: true, get: function () { return application_client_1.decodeNamedTuple; } }); | ||
var logic_error_1 = require("./application_client/logic_error"); | ||
Object.defineProperty(exports, "LogicError", { enumerable: true, get: function () { return logic_error_1.LogicError; } }); | ||
var generate_1 = require("./generate/generate"); | ||
Object.defineProperty(exports, "generateApplicationClient", { enumerable: true, get: function () { return generate_1.generateApplicationClient; } }); | ||
var appspec_1 = require("./generate/appspec"); | ||
Object.defineProperty(exports, "AVMType", { enumerable: true, get: function () { return appspec_1.AVMType; } }); | ||
Object.defineProperty(exports, "getStateSchema", { enumerable: true, get: function () { return appspec_1.getStateSchema; } }); | ||
var clients_1 = require("./sandbox/clients"); | ||
Object.defineProperty(exports, "getAlgodClient", { enumerable: true, get: function () { return clients_1.getAlgodClient; } }); | ||
Object.defineProperty(exports, "getIndexerClient", { enumerable: true, get: function () { return clients_1.getIndexerClient; } }); | ||
var accounts_1 = require("./sandbox/accounts"); | ||
Object.defineProperty(exports, "getAccounts", { enumerable: true, get: function () { return accounts_1.getAccounts; } }); |
@@ -1,3 +0,2 @@ | ||
import { getAlgodClient, getIndexerClient } from "./clients"; | ||
import { getAccounts } from "./accounts"; | ||
export { getAlgodClient, getIndexerClient, getAccounts }; | ||
export { getAlgodClient, getIndexerClient } from "./clients"; | ||
export { getAccounts } from "./accounts"; |
{ | ||
"name": "beaker-ts", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "", | ||
@@ -13,3 +13,3 @@ "main": "./lib/index.js", | ||
"local": "npm install -g && beaker-generate-client example_specs/hello.json src/", | ||
"package":"npm pkg . --output beaker" | ||
"package": "npm pkg . --output beaker" | ||
}, | ||
@@ -20,3 +20,3 @@ "bin": { | ||
"pkg": { | ||
"scripts": "lib/**/*.js" | ||
"scripts": "lib/**/*.js" | ||
}, | ||
@@ -23,0 +23,0 @@ "keywords": [], |
import algosdk, { ABIValue, SuggestedParams, TransactionParams } from "algosdk"; | ||
import { getStateSchema, Schema } from "../generate/"; | ||
import { getStateSchema, Schema } from "../"; | ||
import { parseLogicError, LogicError } from "./logic_error"; | ||
@@ -5,0 +5,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { getAccounts, getAlgodClient } from "../../sandbox"; | ||
import { getAccounts, getAlgodClient } from "../../"; | ||
import {DemoAVM7} from "./demoavm7_client"; | ||
@@ -3,0 +3,0 @@ |
import algosdk from "algosdk"; | ||
import {ApplicationClient, ABIResult, decodeNamedTuple} from "../../application_client/"; | ||
import {Schema,AVMType} from "../../generate/"; | ||
import {ApplicationClient, ABIResult, decodeNamedTuple, Schema, AVMType} from "../../"; | ||
export type BlockDetails = { | ||
@@ -5,0 +4,0 @@ ts: number; |
@@ -1,2 +0,2 @@ | ||
import { getAccounts, getAlgodClient } from "../../sandbox/"; | ||
import { getAccounts, getAlgodClient } from "../../"; | ||
@@ -3,0 +3,0 @@ import {HelloBeaker} from "./hellobeaker_client"; |
import algosdk from "algosdk"; | ||
import {ApplicationClient, ABIResult, decodeNamedTuple} from "../../application_client/"; | ||
import {Schema,AVMType} from "../../generate/"; | ||
import {ApplicationClient, ABIResult, decodeNamedTuple, Schema, AVMType} from "../../"; | ||
export class HelloBeaker extends ApplicationClient { | ||
@@ -5,0 +4,0 @@ desc: string = ""; |
import algosdk from "algosdk"; | ||
import {ApplicationClient, ABIResult, decodeNamedTuple} from "../../application_client/"; | ||
import {Schema,AVMType} from "../../generate/"; | ||
import {ApplicationClient, ABIResult, decodeNamedTuple, Schema, AVMType} from "../../"; | ||
export class ExpensiveApp extends ApplicationClient { | ||
@@ -5,0 +4,0 @@ desc: string = ""; |
@@ -1,2 +0,2 @@ | ||
import { getAccounts, getAlgodClient } from "../../sandbox/"; | ||
import { getAccounts, getAlgodClient } from "../../"; | ||
import {Order, Structer} from "./structer_client"; | ||
@@ -3,0 +3,0 @@ |
import algosdk from "algosdk"; | ||
import {ApplicationClient, ABIResult, decodeNamedTuple} from "../../application_client/"; | ||
import {Schema,AVMType} from "../../generate/"; | ||
import {ApplicationClient, ABIResult, decodeNamedTuple, Schema, AVMType} from "../.."; | ||
export type Order = { | ||
@@ -5,0 +4,0 @@ item: string; |
#!/usr/bin/env ts-node | ||
import { generateApplicationClient, AppSpec } from "./generate/"; | ||
import { generateApplicationClient, AppSpec } from "./"; | ||
import fs from "fs"; | ||
@@ -5,0 +5,0 @@ |
@@ -21,8 +21,5 @@ import { | ||
const CLIENT_NAME = "ApplicationClient"; | ||
const CLIENT_IMPORTS = `{${CLIENT_NAME}, ABIResult, decodeNamedTuple}` | ||
const CLIENT_PATH = "../../application_client/"; | ||
const CLIENT_IMPORTS = `{${CLIENT_NAME}, ABIResult, decodeNamedTuple, Schema, AVMType}` | ||
const CLIENT_PATH = "beaker-ts"; | ||
const APP_SPEC_IMPORTS = "{Schema,AVMType}"; | ||
const APP_SPEC_PATH = "../../generate/"; | ||
const ALGOSDK_IMPORTS = "algosdk"; | ||
@@ -54,3 +51,3 @@ const ALGOSDK_PATH = "algosdk"; | ||
export default function generateApplicationClient(appSpec: AppSpec, path: string) { | ||
export function generateApplicationClient(appSpec: AppSpec, path: string) { | ||
const name = appSpec.contract.name; | ||
@@ -113,14 +110,2 @@ | ||
// Import app spec stuff | ||
factory.createImportDeclaration( | ||
undefined, | ||
undefined, | ||
factory.createImportClause( | ||
false, | ||
factory.createIdentifier(APP_SPEC_IMPORTS), | ||
undefined | ||
), | ||
factory.createStringLiteral(APP_SPEC_PATH), | ||
undefined | ||
), | ||
]; | ||
@@ -127,0 +112,0 @@ } |
@@ -1,9 +0,8 @@ | ||
import * as generate from './generate' | ||
import * as sandbox from './sandbox' | ||
import * as application_client from './application_client' | ||
export { ApplicationClient, ABIResult, MethodArg, MethodArgs, decodeNamedTuple } from "./application_client/application_client"; | ||
export { LogicError } from "./application_client/logic_error"; | ||
export { | ||
generate, | ||
sandbox, | ||
application_client | ||
} | ||
export {generateApplicationClient} from "./generate/generate"; | ||
export { HintSpec, DeclaredSchemaValueSpec, DynamicSchemaValueSpec, Schema, StateSchema, SchemaSpec, AppSources, AppSpec, AVMType, getStateSchema } from "./generate/appspec"; | ||
export { getAlgodClient, getIndexerClient } from "./sandbox/clients"; | ||
export { getAccounts } from "./sandbox/accounts"; |
218186
66
3737