Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #204 from PureStake/master
Browse files Browse the repository at this point in the history
Release 1.4.1-b
  • Loading branch information
purestaketdb authored Mar 23, 2021
2 parents 376ba87 + 9f524b5 commit e907ea1
Show file tree
Hide file tree
Showing 21 changed files with 435 additions and 310 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
branches: [develop, master, release]
pull_request:
# The branches below must be a subset of the branches above
branches: [develop]
branches: [develop, master, release]
schedule:
- cron: '0 16 * * 1'

Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@ _This is the preferred solution for end-users, updates will be automatically ins

Developers working with dApps may also install directly from the release package, or by downloading the project and building it.

## 1.4.0 Update
## 1.4.1 Update

Minor release to address some bugs and usability issues:

The latest release brings:
- Custom network headers creation simplified to allow use of either the Algorand standard header key or custom headers
- Simultaneous AlgoSigner RPC calls through `algod` and `indexer` fix to prevent response mismatches
- Logout bug fix: prevents error message on each logout

## 1.4.0 Update

- Beta support for adding custom networks within AlgoSigner (development networks, BetaNet, etc.).
- Navigation menu improvements
Expand Down
29 changes: 13 additions & 16 deletions docs/dApp-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,19 @@ Sent in transactions will be validated against the Algorand JS SDK transaction t

Proxied requests are passed through to an API service - currently set to the PureStake API service. Endpoints available are limited to what the service exposes. The API backend may be configured by advanced users and is not guaranteed to respond as expected.

## Existing Methods

- [!AlgoSigner](#)
- [Integrating AlgoSigner to add Transaction Capabilities for dApps on Algorand](#integrating-algosigner-to-add-transaction-capabilities-for-dapps-on-algorand)
- [Existing Methods](#existing-methods)
- [AlgoSigner.connect()](#algosignerconnect)
- [AlgoSigner.accounts({ ledger: ‘MainNet|TestNet’ })](#algosigneraccounts-ledger-mainnettestnet-)
- [AlgoSigner.algod({ ledger: ‘MainNet|TestNet’, path: ‘algod v2 path’, ... })](#algosigneralgod-ledger-mainnettestnet-path-algod-v2-path--)
- [AlgoSigner.indexer({ ledger: ‘MainNet|TestNet’, path: ‘indexer v2 path’ })](#algosignerindexer-ledger-mainnettestnet-path-indexer-v2-path-)
- [AlgoSigner.sign(txnObject)](#algosignersigntxnobject)
- [Transaction Requirements](#transaction-requirements)
- [Atomic Transactions](#atomic-transactions)
- [AlgoSigner.signMultisig(txn)](#algosignersignmultisigtxn)
- [Custom Networks](#custom-networks)
- [AlgoSigner.send({ ledger: ‘MainNet|TestNet’, txBlob })](#algosignersend-ledger-mainnettestnet-txblob-)
- [Rejection Messages](#rejection-messages)
## [Existing Methods](#existing-methods)

- [AlgoSigner.connect()](#algosignerconnect)
- [AlgoSigner.accounts({ ledger: ‘MainNet|TestNet’ })](#algosigneraccounts-ledger-mainnettestnet-)
- [AlgoSigner.algod({ ledger: ‘MainNet|TestNet’, path: ‘algod v2 path’, ... })](#algosigneralgod-ledger-mainnettestnet-path-algod-v2-path--)
- [AlgoSigner.indexer({ ledger: ‘MainNet|TestNet’, path: ‘indexer v2 path’ })](#algosignerindexer-ledger-mainnettestnet-path-indexer-v2-path-)
- [AlgoSigner.sign(txnObject)](#algosignersigntxnobject)
- [Transaction Requirements](#transaction-requirements)
- [Atomic Transactions](#atomic-transactions)
- [AlgoSigner.signMultisig(txn)](#algosignersignmultisigtxn)
- [Custom Networks](#custom-networks)
- [AlgoSigner.send({ ledger: ‘MainNet|TestNet’, txBlob })](#algosignersend-ledger-mainnettestnet-txblob-)
- [Rejection Messages](#rejection-messages)

### AlgoSigner.connect()

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "algosigner",
"version": "1.4.0",
"version": "1.4.1",
"author": "https://developer.purestake.io",
"description": "Sign Algorand transactions in your browser with PureStake.",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@algosigner/common",
"version": "1.4.0",
"version": "1.4.1",
"author": "https://developer.purestake.io",
"description": "Common library functions for AlgoSigner.",
"devDependencies": {
Expand Down
4 changes: 1 addition & 3 deletions packages/common/src/messaging/jsonrpc.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import {IJsonRpc} from './interfaces'
import {RequestErrors} from '../types';
import {
JSONRPC_VERSION, JsonRpcMethod, JsonPayload, JsonRpcBody
} from './types';
Expand All @@ -16,7 +14,7 @@ export class JsonRpc /*implements IJsonRpc*/ {
jsonrpc: JSONRPC_VERSION,
method: method,
params: params,
id: (+new Date).toString(16)
id: 'xxxxxxxxxxxxxxx'.replace(/[x]/g, () => {return (Math.random() * 16 | 0).toString(16)})
}
}
}
2 changes: 1 addition & 1 deletion packages/crypto/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "algosigner-crypto",
"version": "1.4.0",
"version": "1.4.1",
"author": "https://developer.purestake.io",
"description": "Cryptographic wrapper for saving and retrieving extention information in Algosigner.",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/dapp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@algosigner/dapp",
"version": "1.4.0",
"version": "1.4.1",
"author": "https://developer.purestake.io",
"description": "Sample DAPP for use with AlgoSigner.",
"scripts": {
Expand Down
40 changes: 20 additions & 20 deletions packages/dapp/src/algosigner.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import {Task} from './fn/task';
import {Router} from './fn/router';
import { Task } from './fn/task';
import { Router } from './fn/router';

class Wrapper {
private static instance: Wrapper;
private task: Task = new Task();
private router: Router = new Router();

public connect: Function = this.task.connect;
public sign: Function = this.task.sign;
public signMultisig: Function = this.task.signMultisig;
public send: Function = this.task.send;
public accounts: Function = this.task.accounts;
public algod: Function = this.task.algod;
public indexer: Function = this.task.indexer;
public subscribe: Function = this.task.subscribe;
private static instance: Wrapper;
private task: Task = new Task();
private router: Router = new Router();

public static getInstance(): Wrapper {
if (!Wrapper.instance) {
Wrapper.instance = new Wrapper();
}
return Wrapper.instance;
public connect: Function = this.task.connect;
public sign: Function = this.task.sign;
public signMultisig: Function = this.task.signMultisig;
public send: Function = this.task.send;
public accounts: Function = this.task.accounts;
public algod: Function = this.task.algod;
public indexer: Function = this.task.indexer;
public subscribe: Function = this.task.subscribe;

public static getInstance(): Wrapper {
if (!Wrapper.instance) {
Wrapper.instance = new Wrapper();
}
return Wrapper.instance;
}
}

export const AlgoSigner = Wrapper.getInstance();
export const AlgoSigner = Wrapper.getInstance();
2 changes: 1 addition & 1 deletion packages/extension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "AlgoSigner",
"author": "https://developer.purestake.io",
"version": "1.4.0",
"version": "1.4.1",
"description": "Algorand Wallet Extension | Send & Receive ALGOs | Sign dApp Transactions",
"icons": {
"48": "icon.png"
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "algosigner-extension",
"version": "1.4.0",
"version": "1.4.1",
"author": "https://developer.purestake.io",
"description": "Sign Algorand transactions in your browser with PureStake.",
"keywords": [
Expand Down
6 changes: 3 additions & 3 deletions packages/extension/src/background/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ export class Settings {
try {
headers = JSON.parse(ledger['headers']);
} catch (e) {
// Use headers default value, but use it as a token if if is a string
// Use headers default value, but use it as a token if it is a string
if (typeof headers === 'string') {
headers = { 'X-API-Key': headers };
// Requests directly to a server would not require the X-API-Key
//headers = {"X-Algo-API-Token": headers};
// This is the case for most users and is now the default for a string only method.
headers = { 'X-Algo-API-Token': headers };
}
}

Expand Down
Loading

0 comments on commit e907ea1

Please sign in to comment.