You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Warning this specification is subject to change before the final 1.0.0 release, based on input from the integrators.
A Kinetic SDK is a wrapper around a Solana SDK with an extra layer that communicates with the Kinetic API.
In order to make it easy for developers to work on multiple platforms, the goal is to make the SDKs as similar as possible in terms of the naming of packages, methods, parameters, and return types.
The Kinetic TypeScript SDK is the reference implementation
Each Kinetic SDK must have at least 2 packages, that export a class that is described below.
The sdk class has an internal KineticSdkInternal class that does most of the heavy lifting.
It creates the Solana transactions that will be signed, then sent to the API.
The communication with the API is done using code generated according to this OpenAPI schema. The project should be set up to re-generate this with a single command or automatically. The code should be generated inside the src/generated directory in the sdk library - not as a separate library.
Package: keypair
The keypair package is a wrapper around the Solana Keypair class and with additional support for mnemonic phrases. It exports a class called Keypair.
Creates the account of the owner keypair for a certain mint
getBalance
Gets the balance of an account
getExplorerUrl
Returns the explorerUrl of a certain path
getHistory
Gets the history of an account
getTokenAccounts
Gets the token accounts of an account
makeTransfer
Transfer an amount of a certain mint to a destination
makeTransferBatch
Same as makeTransfer but with multiple destination/amount pairs
requestAirdrop
Method to request an airdrop for a certain account, amount and mint.
KineticSdk.init
Static method on the class that
fetches the AppConfig from the API
configures the local Solana SDK (see solana package)
configures the logger
returnes the AppConfig
KineticSdk.setup
Static method on the class that
accepts the KineticSdkConfig as input
parses the config
creates an instance of KineticSdk
run KineticSdk.init()
Package: solana
The solana package is a wrapper around the underlying Solana library. It exports a class called Solana with an instance of client that can be used by the end-user of this SDK.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Kinetic SDK Standard
version 1.0.0-rc
A Kinetic SDK is a wrapper around a Solana SDK with an extra layer that communicates with the Kinetic API.
In order to make it easy for developers to work on multiple platforms, the goal is to make the SDKs as similar as possible in terms of the naming of packages, methods, parameters, and return types.
The Kinetic TypeScript SDK is the reference implementation
Each Kinetic SDK must have at least 2 packages, that export a class that is described below.
The
sdk
class has an internalKineticSdkInternal
class that does most of the heavy lifting.It creates the Solana transactions that will be signed, then sent to the API.
The communication with the API is done using code generated according to this OpenAPI schema. The project should be set up to re-generate this with a single command or automatically. The code should be generated inside the
src/generated
directory in thesdk
library - not as a separate library.Package: keypair
The
keypair
package is a wrapper around the SolanaKeypair
class and with additional support for mnemonic phrases. It exports a class calledKeypair
.TypeScript implementation of the Keypair class
Keypair.random()
is a static method thatKeypair
Keypair.fromByteArray
is a static method thatKeypair
Keypair.fromMnemonic
is a static method thatKeypair
Keypair.derive
is a static method thatKeypair.fromSeed
Keypair
Keypair.fromSeed
is a static method thatKeypair.fromSecretKey
Keypair
Keypair.fromSecreateKey
is a static method thatKeypair
Keypair.generateMnemonic
is a static method thatget solana
get solanaPublicKey
get solanaSecretKey
Package: sdk
The
sdk
package is the main entry point and handles communication with the Kinetic API. It exports a class calledKineticSdk
.TypeScript implementation of the KineticSdk class
createAccount
owner
keypair for a certainmint
getBalance
account
getExplorerUrl
explorerUrl
of a certainpath
getHistory
account
getTokenAccounts
account
makeTransfer
amount
of a certainmint
to adestination
makeTransferBatch
makeTransfer
but with multipledestination
/amount
pairsrequestAirdrop
account
,amount
andmint
.KineticSdk.init
solana
package)KineticSdk.setup
KineticSdkConfig
as inputKineticSdk
KineticSdk.init()
Package: solana
The
solana
package is a wrapper around the underlying Solana library. It exports a class calledSolana
with an instance ofclient
that can be used by the end-user of this SDK.TypeScript implementation of the Solana class
Beta Was this translation helpful? Give feedback.
All reactions