Skip to content

chore: update sdk links #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions components/authors/authors.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
export default function Authors({ date, children, by = "by" }) {
return (
<div className="mt-4 mb-16 text-gray-500 text-sm">
{date} {by} {children}
</div>
);
}
export function Author({ name, link }) {
return (
<span className="after:content-[','] last:after:content-['']">
<a
key={name}
href={link}
target="_blank"
style={{ textUnderlinePosition: "under" }}
className="mx-1 text-current underline [text-underline-position:from-font] decoration-from-font"
>
{name}
</a>
</span>
);
}
export default function Authors({ date, children, by = 'by' }) {
return (
<div className="mt-4 mb-16 text-gray-500 text-sm">
{date} {by} {children}
</div>
);
}

export function Author({ name, link }) {
return (
<span className="after:content-[','] last:after:content-['']">
<a
key={name}
href={link}
target="_blank"
style={{ textUnderlinePosition: 'under' }}
className="mx-1 text-current underline [text-underline-position:from-font] decoration-from-font"
>
{name}
</a>
</span>
);
}
36 changes: 18 additions & 18 deletions components/network-button/network-button.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
import { Button } from "nextra/components";
import { Button } from 'nextra/components';

const NETWORK_PARAMS = {
13337: {
chainId: "0x3419",
chainName: "Beam Testnet",
chainId: '0x3419',
chainName: 'Beam Testnet',
nativeCurrency: {
name: "Beam,",
symbol: "BEAM",
name: 'Beam,',
symbol: 'BEAM',
decimals: 18,
},
rpcUrls: ["https://subnets.avax.network/beam/testnet/rpc"],
blockExplorerUrls: ["https://subnets-test.avax.network/beam"],
rpcUrls: ['https://subnets.avax.network/beam/testnet/rpc'],
blockExplorerUrls: ['https://subnets-test.avax.network/beam'],
},
4337: {
chainId: "0x10f1",
chainName: "Beam",
chainId: '0x10f1',
chainName: 'Beam',
nativeCurrency: {
name: "Beam",
symbol: "BEAM",
name: 'Beam',
symbol: 'BEAM',
decimals: 18,
},
rpcUrls: ["https://subnets.avax.network/beam/mainnet/rpc"],
blockExplorerUrls: ["https://subnets.avax.network/beam"],
rpcUrls: ['https://subnets.avax.network/beam/mainnet/rpc'],
blockExplorerUrls: ['https://subnets.avax.network/beam'],
},
};

Expand All @@ -34,7 +34,7 @@ function NetworkButton({ chainId, label }) {
try {
// switch network
await ethereum.request({
method: "wallet_switchEthereumChain",
method: 'wallet_switchEthereumChain',
params: [
{
chainId: NETWORK_PARAMS[chainId].chainId,
Expand All @@ -46,18 +46,18 @@ function NetworkButton({ chainId, label }) {
// add network
try {
await ethereum.request({
method: "wallet_addEthereumChain",
method: 'wallet_addEthereumChain',
params: [NETWORK_PARAMS[chainId]],
});
} catch (addError) {
console.error("Error adding wallet network", addError);
console.error('Error adding wallet network', addError);
}
} else {
console.error("Error switching wallet network", switchError);
console.error('Error switching wallet network', switchError);
}
}
} else {
console.error("No injected wallet provider detected");
console.error('No injected wallet provider detected');
}
}

Expand Down
15 changes: 9 additions & 6 deletions pages/service/sdk.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { Callout, Cards, Card } from 'nextra/components'
import { Callout, Cards, Card } from "nextra/components";

# SDK

The recommended way to interact with the Beam API is by using one of our official SDKs. All of the provided SDKs are meant to be used **server side**, as it's crucial to not expose any of the api keys we provided publicly.

<Callout emoji="⚠️">
It's of the utmost importants that your api key never gets exposed. If your api key is / has been at risk of being exposed, please contact build@onbeam.com.
It's of the utmost importants that your api key never gets exposed. If your
api key is / has been at risk of being exposed, please contact
build@onbeam.com.
</Callout>

### Beam SDKs
Expand All @@ -16,16 +18,17 @@ In order to get started, we currently provide the following SDKs. Note that if t
<Card
icon="✅ "
title="Node.js (Typescript)"
href="https://github.com/Merit-Circle/beam-node"
href="https://www.npmjs.com/package/@onbeam/node"
/>
<Card
icon="✅ "
title="C# (Restsharp)"
href="https://github.com/Merit-Circle/beam-csharp"
title="C# (NuGet)"
href="https://www.nuget.org/packages/Beam"
/>
</Cards>

### Beam OpenAPI Specification

Beam OpenAPI specification empowers you with a broad set of developer tooling, starting with Postman collections and generating your own SDK.

[Beam OpenAPI Specification](https://api.testnet.onbeam.com/api/game-json)
[Beam OpenAPI Specification](https://api.testnet.onbeam.com/api/game-json)