Export token program id in JS client (#694)

This commit is contained in:
Justin Starry 2020-10-23 08:56:15 +08:00 committed by GitHub
parent ee99fcf025
commit b8afb23642
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 0 deletions

View File

@ -22,6 +22,10 @@ import type {
import * as Layout from './layout';
import {sendAndConfirmTransaction} from './util/send-and-confirm-transaction';
export const TOKEN_PROGRAM_ID: PublicKey = new PublicKey(
'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',
);
/**
* 64-bit value
*/

View File

@ -11,6 +11,8 @@ declare module '@solana/spl-token' {
import BN from 'bn.js';
// === client/token.js ===
export const TOKEN_PROGRAM_ID: PublicKey;
export class u64 extends BN {
toBuffer(): Buffer;
static fromBuffer(buffer: Buffer): u64;

View File

@ -6,6 +6,7 @@
*/
declare module '@solana/spl-token' {
declare export var TOKEN_PROGRAM_ID;
declare export class u64 extends BN {
toBuffer(): Buffer;
static fromBuffer(buffer: Buffer): u64;