Skip to content

Commit

Permalink
Merge branch 'release/v1.17.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
onetechnical committed Jun 2, 2022
2 parents 4d83ddb + 01a4188 commit cfd5b88
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 14 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/codegen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "SDK Code Generation"
on:
schedule:
- cron: '20 23 * * *'
permissions:
contents: write
pull-requests: write
jobs:
generate_and_pr:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Generate and PR
uses: algorand/generator/.github/actions/sdk-codegen/@master
with:
args: "-k JS"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# v1.17.0

## What's Changed

- Allow Uint8Arrays public keys for kmd signing by @vividn in https://github.com/algorand/js-algorand-sdk/pull/549
- Update generated files by @Eric-Warehime in https://github.com/algorand/js-algorand-sdk/pull/569
- Build: Add SDK code generation workflow by @Eric-Warehime in https://github.com/algorand/js-algorand-sdk/pull/570
- Update codegen.yml by @Eric-Warehime in https://github.com/algorand/js-algorand-sdk/pull/574
- Generate updated client API code by @algoidurovic in https://github.com/algorand/js-algorand-sdk/pull/566

## New Contributors

- @vividn made their first contribution in https://github.com/algorand/js-algorand-sdk/pull/549
- @Eric-Warehime made their first contribution in https://github.com/algorand/js-algorand-sdk/pull/569
- @algoidurovic made their first contribution in https://github.com/algorand/js-algorand-sdk/pull/566

# v1.16.0

## Added
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Include a minified browser bundle directly in your HTML like so:

```html
<script
src="https://unpkg.com/algosdk@v1.16.0/dist/browser/algosdk.min.js"
integrity="sha384-0BSEzBpLxqFWYBI+sOGhv3W91/wPf+jFwCiuXNrC52XZav2qb3Rz+pfq3AFI0CrL"
src="https://unpkg.com/algosdk@v1.17.0/dist/browser/algosdk.min.js"
integrity="sha384-a9B05lyY5P6hDuZRdqWCEOD7xn/qAY8gc4B5/SJwy+t8GcUlwpzJ25qHcYwxi1NX"
crossorigin="anonymous"
></script>
```
Expand All @@ -32,8 +32,8 @@ or

```html
<script
src="https://cdn.jsdelivr.net/npm/algosdk@v1.16.0/dist/browser/algosdk.min.js"
integrity="sha384-0BSEzBpLxqFWYBI+sOGhv3W91/wPf+jFwCiuXNrC52XZav2qb3Rz+pfq3AFI0CrL"
src="https://cdn.jsdelivr.net/npm/algosdk@v1.17.0/dist/browser/algosdk.min.js"
integrity="sha384-a9B05lyY5P6hDuZRdqWCEOD7xn/qAY8gc4B5/SJwy+t8GcUlwpzJ25qHcYwxi1NX"
crossorigin="anonymous"
></script>
```
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "algosdk",
"version": "1.16.0",
"version": "1.17.0",
"description": "The official JavaScript SDK for Algorand",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
Expand Down
4 changes: 2 additions & 2 deletions src/client/kmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ export default class Kmd extends ServiceClient {
walletHandle: string,
walletPassword: string,
transaction: txn.TransactionLike,
publicKey: string
publicKey: Uint8Array | string
) {
const tx = txn.instantiateTxnIfNeeded(transaction);

Expand Down Expand Up @@ -384,7 +384,7 @@ export default class Kmd extends ServiceClient {
walletHandle: string,
pw: string,
transaction: txn.TransactionLike,
pk: string,
pk: Uint8Array | string,
partial: string
) {
const tx = txn.instantiateTxnIfNeeded(transaction);
Expand Down
63 changes: 58 additions & 5 deletions src/client/v2/algod/models/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1145,19 +1145,50 @@ export class CompileResponse extends BaseModel {
*/
public result: string;

/**
* JSON of the source map
*/
public sourcemap?: Record<string, any>;

/**
* Creates a new `CompileResponse` object.
* @param hash - base32 SHA512_256 of program bytes (Address style)
* @param result - base64 encoded program bytes
* @param sourcemap - JSON of the source map
*/
constructor(hash: string, result: string) {
constructor(hash: string, result: string, sourcemap?: Record<string, any>) {
super();
this.hash = hash;
this.result = result;
this.sourcemap = sourcemap;

this.attribute_map = {
hash: 'hash',
result: 'result',
sourcemap: 'sourcemap',
};
}
}

/**
* Teal disassembly Result
*/
export class DisassembleResponse extends BaseModel {
/**
* disassembled Teal code
*/
public result: string;

/**
* Creates a new `DisassembleResponse` object.
* @param result - disassembled Teal code
*/
constructor(result: string) {
super();
this.result = result;

this.attribute_map = {
result: 'result',
};
}
}
Expand Down Expand Up @@ -1401,7 +1432,18 @@ export class DryrunTxnResult extends BaseModel {
public appCallTrace?: DryrunState[];

/**
* Execution cost of app call transaction
* Budget added during execution of app call transaction.
*/
public budgetAdded?: number | bigint;

/**
* Budget consumed during execution of app call transaction.
*/
public budgetConsumed?: number | bigint;

/**
* Net cost of app execution. Field is DEPRECATED and is subject for removal.
* Instead, use `budget-added` and `budget-consumed.
*/
public cost?: number | bigint;

Expand All @@ -1428,7 +1470,10 @@ export class DryrunTxnResult extends BaseModel {
* @param disassembly - Disassembled program line by line.
* @param appCallMessages -
* @param appCallTrace -
* @param cost - Execution cost of app call transaction
* @param budgetAdded - Budget added during execution of app call transaction.
* @param budgetConsumed - Budget consumed during execution of app call transaction.
* @param cost - Net cost of app execution. Field is DEPRECATED and is subject for removal.
* Instead, use `budget-added` and `budget-consumed.
* @param globalDelta - Application state delta.
* @param localDeltas -
* @param logicSigDisassembly - Disassembled lsig program line by line.
Expand All @@ -1440,6 +1485,8 @@ export class DryrunTxnResult extends BaseModel {
disassembly,
appCallMessages,
appCallTrace,
budgetAdded,
budgetConsumed,
cost,
globalDelta,
localDeltas,
Expand All @@ -1451,6 +1498,8 @@ export class DryrunTxnResult extends BaseModel {
disassembly: string[];
appCallMessages?: string[];
appCallTrace?: DryrunState[];
budgetAdded?: number | bigint;
budgetConsumed?: number | bigint;
cost?: number | bigint;
globalDelta?: EvalDeltaKeyValue[];
localDeltas?: AccountStateDelta[];
Expand All @@ -1463,6 +1512,8 @@ export class DryrunTxnResult extends BaseModel {
this.disassembly = disassembly;
this.appCallMessages = appCallMessages;
this.appCallTrace = appCallTrace;
this.budgetAdded = budgetAdded;
this.budgetConsumed = budgetConsumed;
this.cost = cost;
this.globalDelta = globalDelta;
this.localDeltas = localDeltas;
Expand All @@ -1475,6 +1526,8 @@ export class DryrunTxnResult extends BaseModel {
disassembly: 'disassembly',
appCallMessages: 'app-call-messages',
appCallTrace: 'app-call-trace',
budgetAdded: 'budget-added',
budgetConsumed: 'budget-consumed',
cost: 'cost',
globalDelta: 'global-delta',
localDeltas: 'local-deltas',
Expand Down Expand Up @@ -2011,8 +2064,8 @@ export class ProofResponse extends BaseModel {

/**
* The type of hash function used to create the proof, must be one of:
* * sumhash
* * sha512_256
* * sha256
*/
public hashtype?: string;

Expand All @@ -2024,8 +2077,8 @@ export class ProofResponse extends BaseModel {
* @param treedepth - Represents the depth of the tree that is being proven, i.e. the number of edges
* from a leaf to the root.
* @param hashtype - The type of hash function used to create the proof, must be one of:
* * sumhash
* * sha512_256
* * sha256
*/
constructor({
idx,
Expand Down

0 comments on commit cfd5b88

Please sign in to comment.