Skip to content

Commit

Permalink
adds license file to each component.
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-tomlinson committed Mar 2, 2024
1 parent 89b5dc6 commit f0ed0ee
Show file tree
Hide file tree
Showing 11 changed files with 148 additions and 120 deletions.
21 changes: 21 additions & 0 deletions Components/AddMultiSigSigner/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Lockb0X-LLC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
21 changes: 21 additions & 0 deletions Components/CreateMultiSig/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Lockb0X-LLC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
21 changes: 21 additions & 0 deletions Components/GenerateKeyPair/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Lockb0X-LLC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
21 changes: 21 additions & 0 deletions Components/SendFunds/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Lockb0X-LLC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
37 changes: 0 additions & 37 deletions ExampleJsInterop.cs

This file was deleted.

89 changes: 37 additions & 52 deletions Pakana Stellar Razor Components.csproj
Original file line number Diff line number Diff line change
@@ -1,56 +1,41 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>Pakana_Stellar_Razor_Components</RootNamespace>
<ApplicationIcon>pkcomponents.ico</ApplicationIcon>
<Title>Pakana Stellar Razor Components</Title>
<Company>Lockb0X LLC</Company>
<Authors>Joshua Kassabian, Steven Tomlinson</Authors>
<Description>The Pakana Stellar Razor Components provide a set of powerful and customizable Razor Components for integrating Stellar blockchain functionality seamlessly into your web applications. These components simplify the integration process, offering a user-friendly interface for Stellar transactions and multisignature operations.</Description>
<Copyright>MIT</Copyright>
<RepositoryUrl>https://github.com/lockb0x-llc/Pakana-Stellar-Razor-Components</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageIcon>pkcomponents.png</PackageIcon>
<PackageReleaseNotes>Powered by Stellar Blockchains Latest Protocol 20 Release Supporting Smart Contracts and Blockchain Transactions. Learn more at https://stellar.org/</PackageReleaseNotes>
<PackageTags>Blockchain, Stellar, MultiSig, Components, Razor, Javascript, Html, Finance</PackageTags>
<PackageProjectUrl>https://www.pakana.net/</PackageProjectUrl>
<PackageId>Pre-release-Pakana-Stellar-Razor-Components</PackageId>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<Content Include="pkcomponents.ico" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\..\OneDrive\Desktop\pkcomponents.png">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>


<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.2" />
</ItemGroup>

<ItemGroup>
<None Update="LICENSE.txt">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Update="README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>Pakana_Stellar_Razor_Components</RootNamespace>
<ApplicationIcon>pkcomponents.ico</ApplicationIcon>
<Title>Pakana Stellar Razor Components</Title>
<Company>Lockb0X LLC</Company>
<Authors>Joshua Kassabian, Steven Tomlinson</Authors>
<Description>The Pakana Stellar Razor Components provide a set of powerful and customizable Razor Components for integrating Stellar blockchain functionality seamlessly into your web applications. These components simplify the integration process, offering a user-friendly interface for Stellar transactions and multisignature operations.</Description>
<Copyright>MIT</Copyright>
<RepositoryUrl>https://github.com/lockb0x-llc/Pakana-Stellar-Razor-Components</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageIcon>pkcomponents.png</PackageIcon>
<PackageReleaseNotes>Powered by Stellar Blockchains Latest Protocol 20 Release Supporting Smart Contracts and Blockchain Transactions. Learn more at https://stellar.org/</PackageReleaseNotes>
<PackageTags>Blockchain, Stellar, MultiSig, Components, DotNet, Razor, Javascript, Html, Finance, Payments</PackageTags>
<PackageProjectUrl>https://www.pakana.net/</PackageProjectUrl>
<PackageId>Pre-release-Pakana-Stellar-Razor-Components</PackageId>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>


<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.2" />
</ItemGroup>

<ItemGroup>
<None Update="README.md">
<Pack>True</Pack>
<PackagePath>content\</PackagePath>
</None>
</ItemGroup>

</Project>
48 changes: 23 additions & 25 deletions Scripts/HorizonServer.js → wwwroot/Scripts/HorizonServer.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<script>
document.addEventListener("DOMContentLoaded", async function () {
document.addEventListener("DOMContentLoaded", async function () {
if (typeof StellarSdk === 'undefined') {
console.error("Stellar SDK is not loaded");
return;
return;
}

let assetCode = ''; // Add the asset code here for Establishing Trustline During Wallet Creation
Expand All @@ -13,56 +12,56 @@
// Note: that the namespace for StellarSDK has been refactored for protocol 20.
// Now there is StellarSDK., StellarSDK.Horizon., and StellarSDK.Soroban
horizonServer = new StellarSdk.Horizon.Server('https://horizon-testnet.stellar.org'); // Initialize horizonServer here
console.log("Stellar SDK Server instance created:", horizonServer);
console.log("Stellar SDK Server instance created:", horizonServer);
} catch (e) {
console.error("Error creating StellarSdk.Server instance:", e);
return; // Exit if horizonServer cannot be initialized
return; // Exit if horizonServer cannot be initialized
}

async function fetchAccount(publicKey) {
try {
const account = await horizonServer.loadAccount(publicKey); // Use horizonServer here
console.log(account.balances);
return account.balances;
console.log(account.balances);
return account.balances;
} catch (error) {
console.error("Error fetching account:", error);
console.error("Error fetching account:", error);
}
}

async function fetchRecentPayments(publicKey, limit = 10) {
try {
const payments = await horizonServer.payments()
.forAccount(publicKey)
.limit(limit)
.order('desc')
.call(); // Use horizonServer here
console.log(payments.records);
return payments.records;
.forAccount(publicKey)
.limit(limit)
.order('desc')
.call(); // Use horizonServer here
console.log(payments.records);
return payments.records;
} catch (error) {
console.error("Error fetching recent payments:", error);
console.error("Error fetching recent payments:", error);
}
}

async function getWallet(publicKey) {
try {
var balances = await fetchAccount(publicKey);
var recentPayments = await fetchRecentPayments(publicKey);
var recentPayments = await fetchRecentPayments(publicKey);

return {
publicKey,
balances,
recentPayments
};
return {
publicKey,
balances,
recentPayments
};
} catch (error) {
throw new Error(`Failed to fetch wallet: ${error.message}`);
}
}

async function generateKeypair() {
const pair = StellarSdk.Keypair.random();
return {
publicKey: pair.publicKey(),
secret: pair.secret()
return {
publicKey: pair.publicKey(),
secret: pair.secret()
};
}

Expand All @@ -87,4 +86,3 @@
window.fetchAccount = fetchAccount;
window.fetchRecentPayments = fetchRecentPayments;
});
</script>
File renamed without changes.
File renamed without changes.
6 changes: 0 additions & 6 deletions wwwroot/exampleJsInterop.js

This file was deleted.

4 changes: 4 additions & 0 deletions wwwroot/pakanaConfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"assetCode": "XLM",
"distributionWalletPk": ""
}

0 comments on commit f0ed0ee

Please sign in to comment.