Skip to content

Commit

Permalink
Merge pull request #11 from randlabs/update-api-endpoints
Browse files Browse the repository at this point in the history
Update algod node endpoints to new algoexplorer api endpoints
  • Loading branch information
M-Picco authored Apr 18, 2022
2 parents 88fd3a1 + df4a5a7 commit 4138089
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion docs/getting-started/choosing-network.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Follow this example to create a transaction choosing the Testnet network and sen
import algosdk from "algosdk";
import MyAlgoConnect from '@randlabs/myalgo-connect';

const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', '');

const params = await algodClient.getTransactionParams().do();

Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ There are two options to create transactions accepted by MyAlgo Connect:
```jsx
import algosdk from "algosdk";

const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', '');

const params = await algodClient.getTransactionParams().do();

Expand Down Expand Up @@ -75,7 +75,7 @@ After the user has signed the transaction(s), the object signedTxn should have t
```jsx
import algosdk from "algosdk";

const algodClient = new algosdk.Algodv2(“”, 'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2(“”, 'https://node.testnet.algoexplorerapi.io', '');

const response = await algodClient.sendRawTransaction(signedTxn.blob).do();
```
4 changes: 2 additions & 2 deletions src/components/ASATransactionExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const algoSdkCode = `
import algosdk from "algosdk";
import MyAlgoConnect from '@randlabs/myalgo-connect';
const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', '');
const params = await algodClient.getTransactionParams().do();
const txn = algosdk.makeAssetTransferTxnWithSuggestedParamsFromObject({
Expand All @@ -37,7 +37,7 @@ const anotherAlternativeCode = `
import algosdk from "algosdk";
import MyAlgoConnect from '@randlabs/myalgo-connect';
const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', '');
const params = await algodClient.getTransactionParams().do();
const txn = {
Expand Down
4 changes: 2 additions & 2 deletions src/components/ApplCloseOutExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const codeV1 = `
import algosdk from "algosdk";
import MyAlgoConnect from '@randlabs/myalgo-connect';
const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', '');
const params = await algodClient.getTransactionParams().do();
const txn : any = {
Expand All @@ -34,7 +34,7 @@ const codeV2 = `
import algosdk from "algosdk";
import MyAlgoConnect from '@randlabs/myalgo-connect';
const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', '');
const params = await algodClient.getTransactionParams().do();
const txn = algosdk.makeApplicationCloseOutTxnFromObject({
Expand Down
4 changes: 2 additions & 2 deletions src/components/ApplCreateTransactionExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const codeV1 = `
import algosdk from "algosdk";
import MyAlgoConnect from '@randlabs/myalgo-connect';
const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', '');
const params = await algodClient.getTransactionParams().do();
const txn = {
Expand All @@ -36,7 +36,7 @@ const codeV2 = `
import algosdk from "algosdk";
import MyAlgoConnect from '@randlabs/myalgo-connect';
const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', '');
const params = await algodClient.getTransactionParams().do();
const txn = algosdk.makeApplicationCreateTxnFromObject({
Expand Down
4 changes: 2 additions & 2 deletions src/components/ApplDeleteTransactionExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const codeV1 = `
import algosdk from "algosdk";
import MyAlgoConnect from '@randlabs/myalgo-connect';
const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', '');
const params = await algodClient.getTransactionParams().do();
const txn : any = {
Expand All @@ -31,7 +31,7 @@ const codeV2 = `
import algosdk from "algosdk";
import MyAlgoConnect from '@randlabs/myalgo-connect';
const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', '');
const params = await algodClient.getTransactionParams().do();
const txn = algosdk.makeApplicationDeleteTxnFromObject({
Expand Down
4 changes: 2 additions & 2 deletions src/components/ApplOptInExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const codeV1 = `
import algosdk from "algosdk";
import MyAlgoConnect from '@randlabs/myalgo-connect';
const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', '');
const params = await algodClient.getTransactionParams().do();
const txn : any = {
Expand All @@ -33,7 +33,7 @@ const codeV2 = `
import algosdk from "algosdk";
import MyAlgoConnect from '@randlabs/myalgo-connect';
const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', '');
const params = await algodClient.getTransactionParams().do();
const txn = algosdk.makeApplicationOptInTxnFromObject({
Expand Down
4 changes: 2 additions & 2 deletions src/components/ApplUpdateTransactionExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const codeV1 = `
import algosdk from "algosdk";
import MyAlgoConnect from '@randlabs/myalgo-connect';
const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', '');
const params = await algodClient.getTransactionParams().do();
const txn = {
Expand All @@ -31,7 +31,7 @@ const codeV2 = `
import algosdk from "algosdk";
import MyAlgoConnect from '@randlabs/myalgo-connect';
const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', '');
const params = await algodClient.getTransactionParams().do();
const txn = algosdk.makeApplicationUpdateTxnFromObject({
Expand Down
4 changes: 2 additions & 2 deletions src/components/GroupPaymentExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const codeV1 = `
import algosdk from "algosdk";
import MyAlgoConnect from '@randlabs/myalgo-connect';
const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', '');
const params = await algodClient.getTransactionParams().do();
const txn1: any = {
Expand Down Expand Up @@ -44,7 +44,7 @@ const codeV2 = `
import algosdk from "algosdk";
import MyAlgoConnect from '@randlabs/myalgo-connect';
const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', '');
const params = await algodClient.getTransactionParams().do();
const txn1 = algosdk.makePaymentTxnWithSuggestedParamsFromObject({
Expand Down
4 changes: 2 additions & 2 deletions src/components/GroupedPaymentExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const codeV1 = `
import algosdk from "algosdk";
import MyAlgoConnect from '@randlabs/myalgo-connect';
const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', '');
const params = await algodClient.getTransactionParams().do();
const txn1: any = {
Expand Down Expand Up @@ -43,7 +43,7 @@ const codeV2 = `
import algosdk from "algosdk";
import MyAlgoConnect from '@randlabs/myalgo-connect';
const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', '');
const params = await algodClient.getTransactionParams().do();
const txn1 = algosdk.makePaymentTxnWithSuggestedParamsFromObject({
Expand Down
4 changes: 2 additions & 2 deletions src/components/PaymentTransactionExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const codeV1 = `
import algosdk from "algosdk";
import MyAlgoConnect from '@randlabs/myalgo-connect';
const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', '');
const params = await algodClient.getTransactionParams().do();
const txn: any = {
Expand All @@ -34,7 +34,7 @@ const codeV2 = `
import algosdk from "algosdk";
import MyAlgoConnect from '@randlabs/myalgo-connect';
const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', '');
const params = await algodClient.getTransactionParams().do();
const txn = algosdk.makePaymentTxnWithSuggestedParamsFromObject({
Expand Down
4 changes: 2 additions & 2 deletions src/components/PaymentTransactionOverrideSignerExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const codeV1 = `
import algosdk from "algosdk";
import MyAlgoConnect from '@randlabs/myalgo-connect';
const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', '');
const params = await algodClient.getTransactionParams().do();
const txn: any = {
Expand All @@ -38,7 +38,7 @@ const codeV2 = `
import algosdk from "algosdk";
import MyAlgoConnect from '@randlabs/myalgo-connect';
const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', '');
const params = await algodClient.getTransactionParams().do();
const txn = algosdk.makePaymentTxnWithSuggestedParamsFromObject({
Expand Down
2 changes: 1 addition & 1 deletion src/components/PaymentWithTealExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const codeV2 =
import algosdk from "algosdk";
import MyAlgoConnect from '@randlabs/myalgo-connect';
const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', '');
const params = await algodClient.getTransactionParams().do();
const txn = algosdk.makePaymentTxnWithSuggestedParamsFromObject({
Expand Down
2 changes: 1 addition & 1 deletion src/components/homepage/SendTransaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import PrismCode from '../commons/Code';
const code = `
import algosdk from "algosdk";
const algodClient = new algosdk.Algodv2('', 'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2('', 'https://node.testnet.algoexplorerapi.io', '');
const response = await algodClient.sendRawTransaction(signedTxn.blob).do();
`;
Expand Down
2 changes: 1 addition & 1 deletion src/context/preLoadedData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function PreLoadDataContextComponent(props: any): JSX.Element {
//@ts-ignore
setAlgosdk(x);

let client = new x.Algodv2('', 'https://api.testnet.algoexplorer.io', '');
let client = new x.Algodv2('', 'https://node.testnet.algoexplorerapi.io', '');
//@ts-ignore
setAlgoClient(client);

Expand Down
2 changes: 1 addition & 1 deletion src/utils/connections.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import algosdk from "algosdk";

const algodClient = new algosdk.Algodv2('', 'https://api.testnet.algoexplorer.io', '');
const algodClient = new algosdk.Algodv2('', 'https://node.testnet.algoexplorerapi.io', '');

export {
algodClient
Expand Down

0 comments on commit 4138089

Please sign in to comment.